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

27 lines
745 B
C#

using Microsoft.EntityFrameworkCore;
namespace ApiPolo.Models.PMS_dbcontext
{
/// <summary></summary>
public class PMS_CPWARN_DbContext : DbContext
{
/// <summary></summary>
public DbSet<Prog2>? Progressivi { get; set; }
/// <summary></summary>
public PMS_CPWARN_DbContext(DbContextOptions<PMS_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
});
}
}
}