Ancora update metodi + udpate async generico
This commit is contained in:
@@ -194,9 +194,9 @@ namespace MP.Data.Controllers
|
||||
/// Elenco Gruppi tipo Fasi
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<AnagGruppiModel> AnagGruppiFase()
|
||||
public Task<List<AnagGruppiModel>> AnagGruppiFaseAsync()
|
||||
{
|
||||
return AnagGruppiGetTipo("FASE");
|
||||
return AnagGruppiGetTipoAsync("FASE");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1352,24 +1352,15 @@ namespace MP.Data.Controllers
|
||||
/// </summary>
|
||||
/// <param name="IdxOdl">id odl da cercare</param>
|
||||
/// <returns></returns>
|
||||
public List<AnagGiacenzeModel> ListGiacenze(int IdxOdl)
|
||||
public async Task<List<AnagGiacenzeModel>> ListGiacenzeAsync(int IdxOdl)
|
||||
{
|
||||
List<AnagGiacenzeModel> dbResult = new List<AnagGiacenzeModel>();
|
||||
using (var dbCtx = new MoonPro_InveContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
dbResult = dbCtx
|
||||
.DbGiacenzeData
|
||||
.AsNoTracking()
|
||||
.Where(x => x.IdxOdl == IdxOdl)
|
||||
.ToList();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante ListGiacenze{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
using var dbCtx = new MoonPro_InveContext(_configuration);
|
||||
dbResult = await dbCtx
|
||||
.DbGiacenzeData
|
||||
.Where(x => x.IdxOdl == IdxOdl)
|
||||
.AsNoTracking()
|
||||
.ToListAsync();
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user