27 lines
784 B
C#
27 lines
784 B
C#
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace ApiPolo.Models.VT_dbcontext
|
|
{
|
|
/// <summary></summary>
|
|
public class VT_DATI_AZIENDA_DbContext : DbContext
|
|
{
|
|
/// <summary></summary>
|
|
public DbSet<DatiAzienda>? Dati { get; set; }
|
|
|
|
/// <summary></summary>
|
|
public VT_DATI_AZIENDA_DbContext(DbContextOptions<VT_DATI_AZIENDA_DbContext> options) : base(options)
|
|
{
|
|
}
|
|
/// <summary></summary>
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
{
|
|
modelBuilder.Entity<DatiAzienda>().ToTable("DATI_AZIENDA");
|
|
modelBuilder.Entity<DatiAzienda>().HasKey(table => new
|
|
{
|
|
table.azienda,
|
|
table.tecnico
|
|
});
|
|
}
|
|
}
|
|
}
|