This commit is contained in:
Marco Audiffredi 2025-03-21 16:24:00 +01:00
parent 994e4de981
commit dfd94ed878
7 changed files with 25 additions and 0 deletions

Binary file not shown.

Binary file not shown.

View File

@ -53,6 +53,7 @@ using Microsoft.Extensions.Primitives;
using System.Text.RegularExpressions;
using System.Runtime.CompilerServices;
using System.Diagnostics;
using ApiPolo.Models.Maras_DbContext;
namespace ApiPolo.Controllers
{
@ -69,6 +70,8 @@ namespace ApiPolo.Controllers
private readonly TokenDbContext? _tokens;
private readonly Maras_DbContext _Maras;
#region TECNICI
private readonly FERRA_TECNICIDbContext _Ferra_tecnici;
private readonly MARRO_TECNICIDbContext _Marro_tecnici;
@ -114,6 +117,7 @@ namespace ApiPolo.Controllers
private readonly LIFT_WEB_CHIAMATEDbContext _LW_calltec;
private readonly TEDES_CHIAMATE_DbContext _Tedes_calltec;
private readonly SECURITY_CHIAMATEDbContext _Sys_calltec;
#endregion
#region CHIUSURE
@ -536,6 +540,7 @@ namespace ApiPolo.Controllers
IConfiguration configuration,
ConfigurazioniDbContext config,
TokenDbContext tokens,
Maras_DbContext maras,
#region tecnici
FERRA_TECNICIDbContext Ferra_tecnici,
@ -897,6 +902,8 @@ namespace ApiPolo.Controllers
#endregion
)
{
_configuration = configuration;
@ -1260,6 +1267,8 @@ namespace ApiPolo.Controllers
_Sys_Buoni = Sys_Buoni;
#endregion
_Maras = maras;
}
#region Utility
private async Task<Configurazioni> readConf(string ten)

View File

@ -0,0 +1,16 @@
using Microsoft.EntityFrameworkCore;
namespace ApiPolo.Models.Maras_DbContext
{
public class Maras_DbContext : DbContext
{
public DbSet<Caus_Rapp>? Causali { get; set; }
public DbSet<Chiusure>? Chiusure { get; set; }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<Caus_Rapp>().ToView("API_CAUS_RAPP");
modelBuilder.Entity<Chiusure>().ToView("API_CHIUSURE");
}
}
}