ApiManutenzioni/ApiPolo/Models/Lift_web_dbcontext/LIFT_WEB_MAGAZZINIDbContext.cs
2024-04-23 15:19:58 +02:00

28 lines
763 B
C#

using Microsoft.EntityFrameworkCore;
namespace ApiPolo.Models.Lift_web_dbcontext
{
/// <summary></summary>
public class LIFT_WEB_MAGAZZINIDbContext : DbContext
{
/// <summary></summary>
public DbSet<Magazzini>? Magaz { get; set; }
/// <summary></summary>
public LIFT_WEB_MAGAZZINIDbContext(DbContextOptions<LIFT_WEB_MAGAZZINIDbContext> options) : base(options)
{
}
/// <summary></summary>
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<Magazzini>().ToTable("DEMOMAGAZZIN");
modelBuilder.Entity<Magazzini>().HasKey(table => new
{
table.mgcodmag
});
}
}
}