28 lines
793 B
C#
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
|
|
});
|
|
}
|
|
}
|
|
}
|