using ApiPolo.Models; using ApiPolo.Models.VT_dbcontext; using Microsoft.EntityFrameworkCore; namespace Api_VT.Models.VT_dbcontext { public class VT_CODICE_SEGNALAZIONE_DbContext : DbContext { public DbSet CodSegn { get; set; } public VT_CODICE_SEGNALAZIONE_DbContext(DbContextOptions options) : base(options) { } protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.Entity().ToTable("CODSEGN"); modelBuilder.Entity().HasKey(Table => new { Table.cscodice, Table.cscodazi }); // Definizione della chiave primaria composta } } }