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

28 lines
796 B
C#

using Microsoft.EntityFrameworkCore;
namespace ApiPolo.Models.Sicilia_dbcontext
{
/// <summary></summary>
public class SICILIA_MAG_NEWDbContext:DbContext
{
/// <summary></summary>
public DbSet<Mag_New>? Mag { get; set; }
/// <summary></summary>
public SICILIA_MAG_NEWDbContext(DbContextOptions<SICILIA_MAG_NEWDbContext> options) : base(options)
{
}
/// <summary></summary>
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<Mag_New>().ToTable("LABSEMAG_NEW");
modelBuilder.Entity<Mag_New>().HasKey(table => new
{
table.seriale_rapportino,
table.riga
});
}
}
}