27 lines
797 B
C#
27 lines
797 B
C#
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace ApiPolo.Models.VT_dbcontext
|
|
{
|
|
/// <summary></summary>
|
|
public class VT_COMMESSE_TABLE_DbContext : DbContext
|
|
{
|
|
/// <summary></summary>
|
|
public DbSet<CommesseVT_Table>? CommTable { get; set; }
|
|
|
|
/// <summary></summary>
|
|
public VT_COMMESSE_TABLE_DbContext(DbContextOptions<VT_COMMESSE_TABLE_DbContext> options) : base(options)
|
|
{
|
|
}
|
|
|
|
/// <summary></summary>
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
{
|
|
modelBuilder.Entity<CommesseVT_Table>().ToTable("COMMESSE");
|
|
modelBuilder.Entity<CommesseVT_Table>().HasKey(table => new {
|
|
table.laserial,
|
|
table.lacodazi
|
|
});
|
|
}
|
|
}
|
|
}
|