Update SPEC + nuget:

- fix compare invariant x azienda
- EFCore
- EgwCoreLibs
- Blazored storage
- NLog cons etup json
- Rimozione caching Redis (old)
- Mailkit
This commit is contained in:
Samuele Locatelli
2024-09-04 07:32:45 +02:00
parent a5d60cfc25
commit b90603fda7
9 changed files with 77 additions and 61 deletions
+1 -1
View File
@@ -207,7 +207,7 @@ namespace MP.Data.Controllers
dbResult = dbCtx
.DbSetArticoli
.AsNoTracking()
.Where(x => (azienda == "*" || x.Azienda.Equals(azienda, StringComparison.InvariantCultureIgnoreCase)) && (string.IsNullOrEmpty(searchVal) || x.CodArticolo.Contains(searchVal) || x.DescArticolo.Contains(searchVal) || x.Disegno.Contains(searchVal)))
.Where(x => (azienda == "*" || x.Azienda.ToLower().Equals(azienda.ToLower())) && (string.IsNullOrEmpty(searchVal) || x.CodArticolo.Contains(searchVal) || x.DescArticolo.Contains(searchVal) || x.Disegno.Contains(searchVal)))
.OrderBy(x => x.CodArticolo)
.Take(numRecord)
.ToList();
+7 -7
View File
@@ -18,15 +18,15 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Blazored.LocalStorage" Version="4.3.0" />
<PackageReference Include="Blazored.LocalStorage" Version="4.5.0" />
<PackageReference Include="Blazored.SessionStorage" Version="2.4.0" />
<PackageReference Include="EgwCoreLib.Utils" Version="1.4.2310.2417" />
<PackageReference Include="EgwCoreLib.Utils" Version="1.5.2408.2710" />
<PackageReference Include="MailKit" Version="4.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Http.Connections.Common" Version="6.0.24" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.9">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.33" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.33" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.33" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.33">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
@@ -34,6 +34,6 @@
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="6.0.0" />
<PackageReference Include="MongoDB.Driver" Version="2.19.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NLog" Version="5.1.1" />
<PackageReference Include="NLog" Version="5.3.3" />
</ItemGroup>
</Project>
+5 -4
View File
@@ -5,7 +5,7 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>MP.SPEC</RootNamespace>
<Version>6.16.2404.3016</Version>
<Version>6.16.2409.407</Version>
<UserSecretsId>1800a78a-6ff1-40f9-b490-87fb8bfc1394</UserSecretsId>
</PropertyGroup>
@@ -38,12 +38,13 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Blazored.LocalStorage" Version="4.3.0" />
<PackageReference Include="Blazored.LocalStorage" Version="4.5.0" />
<PackageReference Include="Blazored.SessionStorage" Version="2.4.0" />
<PackageReference Include="EgwCoreLib.Razor" Version="1.4.2310.2417" />
<PackageReference Include="EgwCoreLib.Utils" Version="1.4.2310.2417" />
<PackageReference Include="EgwCoreLib.Razor" Version="1.5.2408.2710" />
<PackageReference Include="EgwCoreLib.Utils" Version="1.5.2408.2710" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Negotiate" Version="6.0.9" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NLog.Web.AspNetCore" Version="5.3.12" />
</ItemGroup>
<ItemGroup>
-46
View File
@@ -1,46 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd"
autoReload="true"
throwExceptions="false"
internalLogLevel="Off" internalLogFile="c:\temp\nlog-internal.log">
<!-- optional, add some variables
https://github.com/nlog/NLog/wiki/Configuration-file#variables
-->
<variable name="myvar" value="myvalue" />
<!--
See https://github.com/nlog/nlog/wiki/Configuration-file
for information on customizing logging rules and outputs.
-->
<targets>
<!--
add your targets here
See https://github.com/nlog/NLog/wiki/Targets for possible targets.
See https://github.com/nlog/NLog/wiki/Layout-Renderers for the possible layout renderers.
-->
<!--
Write events to a file with the date in the filename.
<target xsi:type="File" name="f" fileName="${basedir}/logs/${shortdate}.log"
layout="${longdate} ${uppercase:${level}} ${message}" />
-->
<target xsi:type="File" name="fileTarget" fileName="${basedir}/logs/${shortdate}.log" layout="${longdate} | ${uppercase:${level}} | ${logger:shortName=false} | ${message}" />
<target xsi:type="ColoredConsole" name="consoleTarget" layout="${longdate} | ${uppercase:${level}} | ${logger:shortName=true} | ${message}" />
</targets>
<rules>
<!-- add your logging rules here -->
<!--
Write all events with minimal level of Debug (So Debug, Info, Warn, Error and Fatal, but not Trace) to "f"
<logger name="*" minlevel="Debug" writeTo="f" />
-->
<logger name="*" minlevel="Debug" writeTo="consoleTarget" />
<!--<logger name="Microsoft.*" maxlevel="Info" final="true" />-->
<logger name="*" minlevel="Info" writeTo="fileTarget" />
</rules>
</nlog>
+18
View File
@@ -6,6 +6,8 @@ using Microsoft.AspNetCore.Components.Web;
using MP.SPEC.Components;
using MP.SPEC.Data;
using MP.SPEC.Services;
using NLog;
using NLog.Web;
using StackExchange.Redis;
var builder = WebApplication.CreateBuilder(args);
@@ -18,15 +20,26 @@ var builder = WebApplication.CreateBuilder(args);
*
* */
var logger = LogManager.Setup()
.LoadConfigurationFromAppSettings()
.GetCurrentClassLogger();
logger.Info("Program.cs: startup");
ConfigurationManager configuration = builder.Configuration;
// REDIS setup
logger.Info("Setup REDIS");
string connStringRedis = configuration.GetConnectionString("Redis");
//string connStringRedis = configuration.GetConnectionString("RedisAdmin");
string redisSrvAddr = connStringRedis.Substring(0, connStringRedis.IndexOf(":"));
// avvio oggetto shared x redis...
var redisMultiplexer = ConnectionMultiplexer.Connect(connStringRedis);
// Add services to the container.
logger.Info("Setup Auth");
builder.Services.AddAuthentication(NegotiateDefaults.AuthenticationScheme)
.AddNegotiate();
@@ -47,7 +60,10 @@ builder.Services.AddBlazoredSessionStorage();
builder.Services.AddHttpClient();
builder.Services.AddSingleton<IOApiService>();
logger.Info("Aggiunti services");
var app = builder.Build();
logger.Info("Build App");
// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
@@ -75,4 +91,6 @@ app.UseEndpoints(endpoints =>
//app.MapBlazorHub();
//app.MapFallbackToPage("/_Host");
logger.Info("Run App");
app.Run();
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MAPOSPEC </i>
<h4>Versione: 6.16.2404.3016</h4>
<h4>Versione: 6.16.2409.407</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
6.16.2404.3016
6.16.2409.407
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>6.16.2404.3016</version>
<version>6.16.2409.407</version>
<url>https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+43
View File
@@ -5,6 +5,49 @@
"Microsoft.AspNetCore": "Warning"
}
},
"NLog": {
"variables": {
"baseFileDir": "${basedir}/logs/",
"layout": "${longdate} | ${uppercase:${level}} | ${logger:shortName=false} | ${message}"
},
// "internalLogLevel": "Info",
// "internalLogFile": "c:\\temp\\internal-nlog.txt",
"extensions": [
{ "assembly": "NLog.Extensions.Logging" },
{ "assembly": "NLog.Web.AspNetCore" }
],
"throwConfigExceptions": true,
"targets": {
"async": true,
"logfile": {
"type": "File",
"fileName": "${basedir}/logs/${shortdate}.log",
"archiveEvery": "Day",
"archiveFileName": "${basedir}/logs/old/${shortdate}_{#}.log",
"archiveNumbering": "DateAndSequence",
"archiveAboveSize": "1024000",
"archiveDateFormat": "HH",
"maxArchiveFiles": "60",
"maxArchiveDays": "30"
},
"logconsole": {
"type": "ColoredConsole",
"layout": "${longdate} | ${uppercase:${level}} | ${logger:shortName=true} | ${message}"
}
},
"rules": [
{
"logger": "*",
"minLevel": "Trace",
"writeTo": "logconsole"
},
{
"logger": "*",
"minLevel": "Info",
"writeTo": "logfile"
}
]
},
"AllowedHosts": "*",
"CodApp": "MP.SPEC",
"ConnectionStrings": {