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