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