29 lines
817 B
C#
29 lines
817 B
C#
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace ApiPolo.Models.Security_dbcontext
|
|
{
|
|
/// <summary></summary>
|
|
public class SECURITY_PRESE_DbContext:DbContext
|
|
{
|
|
/// <summary></summary>
|
|
public DbSet<Prese>? Prese { get; set; }
|
|
|
|
/// <summary></summary>
|
|
public SECURITY_PRESE_DbContext(DbContextOptions<SECURITY_PRESE_DbContext> 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
|
|
});
|
|
}
|
|
}
|
|
}
|