26 lines
740 B
C#
26 lines
740 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Metadata.Internal;
|
|
|
|
namespace ApiPolo.Models.VT_dbcontext
|
|
{
|
|
public class VT_MAG_NEW_DbContext : DbContext
|
|
{
|
|
public DbSet<Vt_Mag_New> MagNewVt { get; set; }
|
|
|
|
public VT_MAG_NEW_DbContext(DbContextOptions<VT_MAG_NEW_DbContext> options) : base(options)
|
|
{
|
|
}
|
|
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
{
|
|
modelBuilder.Entity<Vt_Mag_New>().ToTable("MAG_NEW_VT");
|
|
modelBuilder.Entity<Vt_Mag_New>()
|
|
.HasKey(Table => new {
|
|
Table.Azienda,
|
|
Table.Seriale_Rapportino,
|
|
Table.Riga
|
|
});
|
|
}
|
|
}
|
|
}
|