Continuo refactor con cache Fusion
This commit is contained in:
@@ -164,9 +164,9 @@ namespace MP.Data.Controllers
|
||||
/// Elenco Gruppi tipo Azienda
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<AnagGruppiModel> AnagGruppiAziende()
|
||||
public Task<List<AnagGruppiModel>> AnagGruppiAziendeAsync()
|
||||
{
|
||||
return AnagGruppiGetTipo("AZIENDA");
|
||||
return AnagGruppiGetTipoAsync("AZIENDA");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -241,6 +241,26 @@ namespace MP.Data.Controllers
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gruppi x tipo modalità Async
|
||||
/// </summary>
|
||||
/// <param name="tipoGruppo"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<AnagGruppiModel>> AnagGruppiGetTipoAsync(string tipoGruppo)
|
||||
{
|
||||
List<AnagGruppiModel> dbResult = new List<AnagGruppiModel>();
|
||||
using (var dbCtx = new MoonProContext(options))
|
||||
{
|
||||
dbResult = await dbCtx
|
||||
.DbSetAnagGruppi
|
||||
.Where(x => x.TipoGruppo == tipoGruppo)
|
||||
.AsNoTracking()
|
||||
.OrderBy(x => x.CodGruppo)
|
||||
.ToListAsync();
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Elenco Gruppi tipo REPARTO (x associazione Macchine-Operatori)
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user