28 lines
811 B
C#
28 lines
811 B
C#
using ApiPolo.Models.Lift_web_dbcontext;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace ApiPolo.Models.Security_dbcontext
|
|
{
|
|
/// <summary></summary>
|
|
public class SECURITY_BUONI_DbContext: DbContext
|
|
{
|
|
/// <summary></summary>
|
|
public DbSet<BuoniLW>? buoni { get; set; }
|
|
|
|
/// <summary></summary>
|
|
public SECURITY_BUONI_DbContext(DbContextOptions<SECURITY_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
|
|
});
|
|
}
|
|
}
|
|
}
|