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

28 lines
793 B
C#

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