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

28 lines
756 B
C#

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