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