27 lines
771 B
C#
27 lines
771 B
C#
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace ApiPolo.Models.Lift_web_dbcontext
|
|
{
|
|
/// <summary></summary>
|
|
public class LIFT_WEB_BUONI_DbContext : DbContext
|
|
{
|
|
/// <summary></summary>
|
|
public DbSet<BuoniLW>? buoni { get; set; }
|
|
|
|
/// <summary></summary>
|
|
public LIFT_WEB_BUONI_DbContext(DbContextOptions<LIFT_WEB_BUONI_DbContext> options) : base(options)
|
|
{
|
|
}
|
|
/// <summary></summary>
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
{
|
|
modelBuilder.Entity<BuoniLW>().ToTable("BUONI");
|
|
modelBuilder.Entity<BuoniLW>().HasKey(table => new
|
|
{
|
|
table.azienda,
|
|
table.ser_buono
|
|
});
|
|
}
|
|
}
|
|
}
|