ApiSoftway/Models/Gesa_DbContext/GESA_CONSEGNE_DbContext.cs
2024-06-17 15:50:52 +02:00

26 lines
733 B
C#

using Microsoft.EntityFrameworkCore;
namespace ApiSoftway.Models.Gesa_DbContext
{
public class GESA_CONSEGNE_DbContext : DbContext
{
/// <summary></summary>
public DbSet<Consegna>? Cons { get; set; }
/// <summary></summary>
public GESA_CONSEGNE_DbContext(DbContextOptions<GESA_CONSEGNE_DbContext> options) : base(options)
{
}
/// <summary></summary>
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<Consegna>().ToTable("GESASMOVIB");
modelBuilder.Entity<Consegna>().HasKey(table => new {
table.Serial,
table.Cprownum
});
}
}
}