diff --git a/MP.SPEC/Pages/Test.razor.cs b/MP.SPEC/Pages/Test.razor.cs
index 7f2957a3..8d495b95 100644
--- a/MP.SPEC/Pages/Test.razor.cs
+++ b/MP.SPEC/Pages/Test.razor.cs
@@ -38,8 +38,8 @@ namespace MP.SPEC.Pages
CurrAction.IsActive = false;
CurrAction.Topic = "Chiusura ODL";
CurrAction.Message = "Rilevato possibile fine operazioni, Vuoi chiudere la commessa?";
- MMDataService.ActionSetReqAsync(CurrAction);
- await Task.Delay(1);
+
+ await MMDataService.ActionSetReqAsync(CurrAction);
}
protected override async Task OnInitializedAsync()
@@ -68,11 +68,11 @@ namespace MP.SPEC.Pages
}
}
- protected void sendMessage()
+ protected async Task SendMessageAsync()
{
CurrAction.DtReq = DateTime.Now;
CurrAction.IsActive = true;
- MMDataService.ActionSetReqAsync(CurrAction);
+ await MMDataService.ActionSetReqAsync(CurrAction);
}
#endregion Protected Methods
diff --git a/MP.SPEC/Program.cs b/MP.SPEC/Program.cs
index 997d8354..36036cdd 100644
--- a/MP.SPEC/Program.cs
+++ b/MP.SPEC/Program.cs
@@ -1,9 +1,10 @@
using Microsoft.AspNetCore.Authentication.Negotiate;
using Microsoft.AspNetCore.StaticFiles;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Diagnostics;
using Microsoft.Extensions.Caching.Distributed;
using Microsoft.Extensions.FileProviders;
-using MP.AppAuth.Services;
-using MP.Data.Services;
+using MP.Data;
using MP.SPEC.Components;
using MP.SPEC.Data;
using MP.SPEC.Services;
@@ -155,20 +156,36 @@ builder.Services.AddFusionCache()
ConnectionMultiplexerFactory = () => Task.FromResult(redisMultiplexer)
}));
+// Metodi principali x accesso dati
+var connStr = builder.Configuration.GetConnectionString("MP.Data")
+ ?? throw new InvalidOperationException("ConnString 'MP.Data' mancante.");
+// aggiungo il costruttore x i DbContextFactory
+builder.Services.AddDbContextFactory
(options =>
+ options.UseSqlServer(connStr)
+ .EnableSensitiveDataLogging(false) // true solo in Sviluppo
+ .ConfigureWarnings(w => w.Ignore(CoreEventId.ManyServiceProvidersCreatedWarning)));
+
+// MP.Data Services Utils - Statistiche DB
+builder.Services.AddSpecDataLayer();
// altri servizi
builder.Services.AddSingleton();
-builder.Services.AddSingleton();
builder.Services.AddSingleton();
-builder.Services.AddSingleton();
builder.Services.AddScoped();
+
+#if false
+builder.Services.AddSingleton();
+builder.Services.AddSingleton();
builder.Services.AddSingleton();
builder.Services.AddSingleton();
-builder.Services.AddSingleton();
+builder.Services.AddSingleton();
+#endif
+#if false
// aggiunta helper local/session storage service
builder.Services.AddScoped();
-builder.Services.AddScoped();
+builder.Services.AddScoped();
+#endif
builder.Services.AddHttpClient();
diff --git a/MP.SPEC/Resources/ChangeLog.html b/MP.SPEC/Resources/ChangeLog.html
index 91e3fb3c..3f744dfc 100644
--- a/MP.SPEC/Resources/ChangeLog.html
+++ b/MP.SPEC/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
Modulo MAPOSPEC
- Versione: 8.16.2606.113
+ Versione: 8.16.2606.116
Note di rilascio:
-
diff --git a/MP.SPEC/Resources/VersNum.txt b/MP.SPEC/Resources/VersNum.txt
index 142014de..87293708 100644
--- a/MP.SPEC/Resources/VersNum.txt
+++ b/MP.SPEC/Resources/VersNum.txt
@@ -1 +1 @@
-8.16.2606.113
+8.16.2606.116
diff --git a/MP.SPEC/Resources/manifest.xml b/MP.SPEC/Resources/manifest.xml
index 1f1a8e1b..a0393e81 100644
--- a/MP.SPEC/Resources/manifest.xml
+++ b/MP.SPEC/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 8.16.2606.113
+ 8.16.2606.116
https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip
https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html
false