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

28 lines
747 B
C#

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