ApiManutenzioni/ApiPolo/Models/Sicilia_dbcontext/SICILIA_MAGAZZINIDbContext.cs
2024-01-23 11:59:33 +01:00

27 lines
758 B
C#

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