28 lines
809 B
C#
28 lines
809 B
C#
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace ApiPolo.Models.Sicilia_dbcontext
|
|
{
|
|
/// <summary></summary>
|
|
public class SICILIA_PRESEDbContext:DbContext
|
|
{
|
|
/// <summary></summary>
|
|
public DbSet<Prese>? Prese { get; set; }
|
|
|
|
/// <summary></summary>
|
|
public SICILIA_PRESEDbContext(DbContextOptions<SICILIA_PRESEDbContext> options) : base(options)
|
|
{
|
|
}
|
|
/// <summary></summary>
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
{
|
|
modelBuilder.Entity<Prese>().ToTable("PRESA");
|
|
modelBuilder.Entity<Prese>().HasKey(table => new {
|
|
table.picodazi,
|
|
table.pimpianto,
|
|
table.picodint,
|
|
table.pidatman
|
|
});
|
|
}
|
|
}
|
|
}
|