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