ApiManutenzioni/ApiPolo/Models/Tedesco_dbcontext/TEDES_MAGAZZINIDbContext.cs
2024-04-23 15:19:58 +02:00

27 lines
752 B
C#

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