28 lines
796 B
C#
28 lines
796 B
C#
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace ApiPolo.Models.Sicilia_dbcontext
|
|
{
|
|
/// <summary></summary>
|
|
public class SICILIA_MAG_NEWDbContext:DbContext
|
|
{
|
|
/// <summary></summary>
|
|
public DbSet<Mag_New>? Mag { get; set; }
|
|
|
|
/// <summary></summary>
|
|
public SICILIA_MAG_NEWDbContext(DbContextOptions<SICILIA_MAG_NEWDbContext> options) : base(options)
|
|
{
|
|
}
|
|
/// <summary></summary>
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
{
|
|
modelBuilder.Entity<Mag_New>().ToTable("LABSEMAG_NEW");
|
|
modelBuilder.Entity<Mag_New>().HasKey(table => new
|
|
{
|
|
table.seriale_rapportino,
|
|
table.riga
|
|
|
|
});
|
|
}
|
|
}
|
|
}
|