28 lines
795 B
C#
28 lines
795 B
C#
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace ApiPolo.Models.PMS_dbcontext
|
|
{
|
|
/// <summary></summary>
|
|
public class PMS_VT_IMPIANTI_DbContext : DbContext
|
|
{
|
|
/// <summary></summary>
|
|
public DbSet<ImpiantoTable>? Imptable { get; set; }
|
|
|
|
/// <summary></summary>
|
|
public PMS_VT_IMPIANTI_DbContext(DbContextOptions<PMS_VT_IMPIANTI_DbContext> options) : base(options)
|
|
{
|
|
}
|
|
/// <summary></summary>
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
{
|
|
modelBuilder.Entity<ImpiantoTable>().ToTable("MIMPIANTI");
|
|
modelBuilder.Entity<ImpiantoTable>().HasKey(table => new
|
|
{
|
|
table.imcodazi,
|
|
table.imcodimp
|
|
});
|
|
}
|
|
}
|
|
}
|