ApiManutenzioni/ApiPolo/Models/Siet_dbcontext/SIET_COMPO_IMPIA_TABLE_DbContext.cs
2024-01-23 11:59:33 +01:00

29 lines
865 B
C#

using Microsoft.EntityFrameworkCore;
namespace ApiPolo.Models.Siet_dbcontext
{
/// <summary></summary>
public class SIET_COMPO_IMPIA_TABLE_DbContext : DbContext
{
/// <summary></summary>
public DbSet<Compo_Impia_Table>? Componen { get; set; }
/// <summary></summary>
public SIET_COMPO_IMPIA_TABLE_DbContext(DbContextOptions<SIET_COMPO_IMPIA_TABLE_DbContext> options) : base(options)
{
}
/// <summary></summary>
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<Compo_Impia_Table>().ToTable("SIET2MICOMIMP");
modelBuilder.Entity<Compo_Impia_Table>().HasKey(table => new
{
table.cocodimp,
table.cprownum,
table.cocodazi
});
}
}
}