ApiManutenzioni/ApiPolo/Models/Lift_web_dbcontext/LIFT_WEB_CPWARN_DbContext.cs
2024-04-23 15:19:58 +02:00

27 lines
765 B
C#

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