27 lines
751 B
C#
27 lines
751 B
C#
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace ApiPolo.Models.Sarom_dbcontext
|
|
{
|
|
/// <summary></summary>
|
|
public class SAROM_MAGAZZINIDbContext : DbContext
|
|
{
|
|
/// <summary></summary>
|
|
public DbSet<Magazzini>? Magaz { get; set; }
|
|
|
|
/// <summary></summary>
|
|
public SAROM_MAGAZZINIDbContext(DbContextOptions<SAROM_MAGAZZINIDbContext> options) : base(options)
|
|
{
|
|
}
|
|
|
|
/// <summary></summary>
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
{
|
|
modelBuilder.Entity<Magazzini>().ToTable("SAROMMAGAZZIN");
|
|
modelBuilder.Entity<Magazzini>().HasKey(table => new
|
|
{
|
|
table.mgcodmag
|
|
});
|
|
}
|
|
}
|
|
}
|