using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Internal; using System.Collections.Generic; namespace ApiPolo.Models.VT_dbcontext { public class VT_ARTICOLI_TABLE_DbContext : DbContext { public DbSet Articoli { get; set; } public VT_ARTICOLI_TABLE_DbContext(DbContextOptions options) : base(options) { } protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.Entity().ToTable("ARTICOLI"); modelBuilder.Entity().HasKey(Table => new { Table.Azienda, Table.SlCodice }); // Definizione della chiave primaria composta //base.OnModelCreating(modelBuilder); } } }