Preparazione metodi Async pre conversione FusionCache

This commit is contained in:
Samuele Locatelli
2026-05-27 19:28:13 +02:00
parent d8bc1379be
commit 2fce840ed9
12 changed files with 90 additions and 63 deletions
+22 -2
View File
@@ -871,9 +871,9 @@ namespace MP.Data.Controllers
/// Elenco valori link (x home e navMenu laterale)
/// </summary>
/// <returns></returns>
public List<LinkMenuModel> ElencoLink()
public Task<List<LinkMenuModel>> ElencoLinkAsync()
{
return ListLinkFilt("SpecLink");
return ListLinkFiltAsync("SpecLink");
}
/// <summary>
@@ -1412,6 +1412,26 @@ namespace MP.Data.Controllers
return dbResult;
}
/// <summary>
/// Elenco link JQM dato filtro tipo, Async
/// </summary>
/// <param name="tipoLink"></param>
/// <returns></returns>
public async Task<List<LinkMenuModel>> ListLinkFiltAsync(string tipoLink)
{
List<LinkMenuModel> dbResult = new List<LinkMenuModel>();
using (var dbCtx = new MoonProContext(options))
{
dbResult = await dbCtx
.DbSetLinkMenu
.Where(x => x.TipoLink == tipoLink)
.AsNoTracking()
.OrderBy(x => x.Ordine)
.ToListAsync();
}
return dbResult;
}
/// <summary>
/// Elenco ODL filtrati x stato, articolo, KeyRich (che contiene stato)
/// </summary>