ApiSoftway/Models/Gesa_DbContext/GESA_SEDECONSEGNA_DbContext.cs

25 lines
717 B
C#

using Microsoft.EntityFrameworkCore;
namespace ApiSoftway.Models.Gesa_DbContext
{
public class GESA_SEDECONSEGNA_DbContext : DbContext
{
public DbSet<SedeConsegna>? SedeConsegna { get; set; }
public GESA_SEDECONSEGNA_DbContext(DbContextOptions<GESA_SEDECONSEGNA_DbContext> options) : base(options)
{
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<SedeConsegna>().ToTable("GESAPIANICON");
modelBuilder.Entity<SedeConsegna>().HasKey(table => new
{
table.Pctipcon,
table.Pccodcon,
table.Cprownum
});
}
}
}