Correzioni warnings vari e test compilazione, fix applicazioni CORE in generale
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using MP.Core.DTO;
|
||||
using MP.Data.DbModels;
|
||||
using MP.Data.DbModels.Anag;
|
||||
using NLog;
|
||||
|
||||
#nullable disable
|
||||
// <Auto-Generated>
|
||||
@@ -13,27 +11,9 @@ namespace MP.Data
|
||||
{
|
||||
public partial class MoonProContext : DbContext
|
||||
{
|
||||
#region Private Fields
|
||||
|
||||
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
private IConfiguration _configuration;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Public Constructors
|
||||
|
||||
//public MoonProContext(IConfiguration configuration)
|
||||
//{
|
||||
// _configuration = configuration;
|
||||
//}
|
||||
|
||||
//public MoonProContext(DbContextOptions<MoonProContext> options, IConfiguration configuration)
|
||||
//: base(options)
|
||||
//{
|
||||
// _configuration = configuration;
|
||||
//}
|
||||
|
||||
public MoonProContext(DbContextOptions<MoonProContext> options) : base(options)
|
||||
{
|
||||
}
|
||||
@@ -92,7 +72,6 @@ namespace MP.Data
|
||||
public virtual DbSet<RegCheckModel> DbSetRegWithCheck { get; set; }
|
||||
public virtual DbSet<SignalLogModel> DbSetSignalLog { get; set; }
|
||||
|
||||
|
||||
public virtual DbSet<ST_Act> DbSetStAct { get; set; }
|
||||
public virtual DbSet<ST_ActRow> DbSetStActRow { get; set; }
|
||||
public virtual DbSet<ST_AnagGruppi> DbSetStAnagGruppi { get; set; }
|
||||
@@ -130,26 +109,8 @@ namespace MP.Data
|
||||
{
|
||||
if (!optionsBuilder.IsConfigured)
|
||||
{
|
||||
string connString = _configuration.GetConnectionString("MP.Data");
|
||||
if (string.IsNullOrEmpty(connString))
|
||||
{
|
||||
connString = _configuration.GetConnectionString("MP.All");
|
||||
}
|
||||
if (string.IsNullOrEmpty(connString))
|
||||
{
|
||||
connString = _configuration.GetConnectionString("MP.Land");
|
||||
}
|
||||
if (string.IsNullOrEmpty(connString))
|
||||
{
|
||||
connString = _configuration.GetConnectionString("MP.Mon");
|
||||
}
|
||||
if (string.IsNullOrEmpty(connString))
|
||||
{
|
||||
connString = _configuration.GetConnectionString("MP.STATS");
|
||||
}
|
||||
|
||||
optionsBuilder.UseSqlServer(connString);
|
||||
//optionsBuilder.UseSqlServer("Server=SQL2016DEV;Database=MoonPro;Trusted_Connection=True;");
|
||||
// fallback si spera non necessario
|
||||
optionsBuilder.UseSqlServer("Server=SQL2016DEV;Database=MoonPro;Trusted_Connection=True;");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user