27 lines
804 B
C#
27 lines
804 B
C#
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace ApiPolo.Models.Marrocco_dbcontext
|
|
{
|
|
/// <summary></summary>
|
|
public class MARRO_VT_IMPIANTI_DbContext: DbContext
|
|
{
|
|
/// <summary></summary>
|
|
public DbSet<ImpiantoTable>? Imptable { get; set; }
|
|
|
|
/// <summary></summary>
|
|
public MARRO_VT_IMPIANTI_DbContext(DbContextOptions<MARRO_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
|
|
});
|
|
}
|
|
}
|
|
}
|