ApiVirtualTask/ApiPolo/Models/VT_dbcontext/VT_CONTI_TABLE_DbContext.cs
2025-05-08 17:41:48 +02:00

29 lines
808 B
C#

using Microsoft.EntityFrameworkCore;
namespace ApiPolo.Models.VT_dbcontext
{
/// <summary></summary>
public class VT_CONTI_TABLE_DbContext : DbContext
{
/// <summary></summary>
public DbSet<AnagTable>? Anagtable { get; set; }
/// <summary></summary>
public VT_CONTI_TABLE_DbContext(DbContextOptions<VT_CONTI_TABLE_DbContext> options) : base(options)
{
}
/// <summary></summary>
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<AnagTable>().ToTable("CONTI");
modelBuilder.Entity<AnagTable>().HasKey(table => new
{
table.antipcon,
table.ancodice,
table.ancodazi
});
}
}
}