46 lines
1.3 KiB
C#
46 lines
1.3 KiB
C#
using Microsoft.EntityFrameworkCore;
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace ApiPolo.Models.Siet_dbcontext
|
|
{
|
|
/// <summary></summary>
|
|
public class SIET_COMMESSE_DESC_DbContext : DbContext
|
|
{
|
|
/// <summary></summary>
|
|
public DbSet<CommessaDescSiet>? Commdesc { get; set; }
|
|
|
|
/// <summary></summary>
|
|
public SIET_COMMESSE_DESC_DbContext(DbContextOptions<SIET_COMMESSE_DESC_DbContext> options) : base(options)
|
|
{
|
|
}
|
|
|
|
/// <summary></summary>
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
{
|
|
modelBuilder.Entity<CommessaDescSiet>().ToTable("SIET2LAV_MAST");
|
|
modelBuilder.Entity<CommessaDescSiet>().HasKey(table => new {
|
|
table.laserial,
|
|
table.latiplav
|
|
});
|
|
}
|
|
}
|
|
|
|
/// <summary>Descrizione commessa per SIET</summary>
|
|
public class CommessaDescSiet
|
|
{
|
|
/// <summary>seriale Commessa</summary>
|
|
[Key]
|
|
public string? laserial { get; set; }
|
|
|
|
/// <summary>tipo lavorazione</summary>
|
|
public string? latiplav { get; set; }
|
|
|
|
/// <summary>centro di costo - ticket</summary>
|
|
public string? lacodcen { get; set; }
|
|
|
|
/// <summary>Codice commessa</summary>
|
|
public string? lacodcom { get; set; }
|
|
|
|
}
|
|
}
|