From 09d3f50de52ec4de1db9b81ca148c4b87a39ca55 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 17 May 2021 16:55:43 +0200 Subject: [PATCH] refresh view x UserAction in MP.Data --- MP.Data/DatabaseModels/UserActionLog.cs | 3 + MP.Data/MP.Data.csproj | 79 ++++++------------------- MP.Data/MoonPro_STATSContext.cs | 12 +++- 3 files changed, 30 insertions(+), 64 deletions(-) diff --git a/MP.Data/DatabaseModels/UserActionLog.cs b/MP.Data/DatabaseModels/UserActionLog.cs index 15426401..1b19f596 100644 --- a/MP.Data/DatabaseModels/UserActionLog.cs +++ b/MP.Data/DatabaseModels/UserActionLog.cs @@ -11,10 +11,13 @@ namespace MP.Data.DatabaseModels public string Azione { get; set; } public string CodArticolo { get; set; } + public string CodMacchina { get; set; } public string Cognome { get; set; } public DateTime DataOraRif { get; set; } public int IdxLog { get; set; } public string IdxMacchina { get; set; } + public int IdxOdl { get; set; } + public string KeyRichiesta { get; set; } public int MatrOpr { get; set; } public string Nome { get; set; } public decimal Qta { get; set; } diff --git a/MP.Data/MP.Data.csproj b/MP.Data/MP.Data.csproj index a8360e39..658bbfa1 100644 --- a/MP.Data/MP.Data.csproj +++ b/MP.Data/MP.Data.csproj @@ -1,65 +1,22 @@ - - net5.0 - MP.Data - MP.Data - + + net5.0 + MP.Data + MP.Data + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + \ No newline at end of file diff --git a/MP.Data/MoonPro_STATSContext.cs b/MP.Data/MoonPro_STATSContext.cs index 3a539ffb..a24410a0 100644 --- a/MP.Data/MoonPro_STATSContext.cs +++ b/MP.Data/MoonPro_STATSContext.cs @@ -142,7 +142,7 @@ namespace MP.Data { entity.HasNoKey(); - entity.ToView("v_UL", "export"); + entity.ToView("v_UI_UL"); entity.Property(e => e.Azione) .IsRequired() @@ -152,18 +152,24 @@ namespace MP.Data .IsRequired() .HasMaxLength(50); + entity.Property(e => e.CodMacchina).HasMaxLength(50); + entity.Property(e => e.Cognome) .IsRequired() .HasMaxLength(50); entity.Property(e => e.DataOraRif).HasColumnType("datetime"); - entity.Property(e => e.IdxLog).ValueGeneratedOnAdd(); - entity.Property(e => e.IdxMacchina) .IsRequired() .HasMaxLength(50); + entity.Property(e => e.IdxOdl).HasColumnName("IdxODL"); + + entity.Property(e => e.KeyRichiesta) + .IsRequired() + .HasMaxLength(50); + entity.Property(e => e.Nome) .IsRequired() .HasMaxLength(50);