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

26 lines
760 B
C#

using Microsoft.EntityFrameworkCore;
namespace ApiPolo.Models.Sicilia_dbcontext
{
/// <summary></summary>
public class SICILIA_CPWARN_DbContext : DbContext
{
/// <summary></summary>
public DbSet<Prog2>? Progressivi { get; set; }
/// <summary></summary>
public SICILIA_CPWARN_DbContext(DbContextOptions<SICILIA_CPWARN_DbContext> options) : base(options)
{
}
/// <summary></summary>
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<Prog2>().ToTable("cpwarn");
modelBuilder.Entity<Prog2>().HasKey(table => new {
table.tablecode,
table.warncode
});
}
}
}