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