Aggiunta migration/creazione DB Utls

This commit is contained in:
Samuele Locatelli
2026-04-16 18:06:18 +02:00
parent 359ffc4676
commit 6b5db421ad
5 changed files with 21 additions and 4 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>6.16.2604.1616</Version>
<Version>6.16.2604.1618</Version>
</PropertyGroup>
<ItemGroup>
+17
View File
@@ -126,6 +126,23 @@ logger.Info("Singleton Route Manager registered");
var app = builder.Build();
// Blocco per la migrazione automatica del DB Utils...
using (var scope = app.Services.CreateScope())
{
var services = scope.ServiceProvider;
try
{
var context = services.GetRequiredService<MoonPro_UtilsContext>();
context.Database.Migrate();
}
catch (Exception ex)
{
var migrateLogger = services.GetRequiredService<ILogger<Program>>();
migrateLogger.LogError(ex, "Si è verificato un errore durante l'aggiornamento del database.");
}
}
// aggiunt base URL x routing corretto
string baseUrl = configuration.GetValue<string>("ServerConf:BaseUrlIoc") ?? "/MP/";
app.UsePathBase(baseUrl);
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MP-IOC </i>
<h4>Versione: 6.16.2604.1616</h4>
<h4>Versione: 6.16.2604.1618</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
6.16.2604.1616
6.16.2604.1618
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>6.16.2604.1616</version>
<version>6.16.2604.1618</version>
<url>https://nexus.steamware.net/repository/SWS/MP-IOC/stable/LAST/MP.IOC.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-IOC/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>