Update caching SPEC
This commit is contained in:
@@ -456,18 +456,18 @@ namespace MP.Data.Controllers
|
||||
/// <param name="azienda"></param>
|
||||
/// <param name="searchVal"></param>
|
||||
/// <returns></returns>
|
||||
public List<AnagArticoliModel> ArticoliGetSearch(int numRecord, string azienda = "*", string searchVal = "")
|
||||
public async Task<List<AnagArticoliModel>> ArticoliGetSearchAsync(int numRecord, string azienda = "*", string searchVal = "")
|
||||
{
|
||||
List<AnagArticoliModel> dbResult = new List<AnagArticoliModel>();
|
||||
using (var dbCtx = new MoonProContext(options))
|
||||
{
|
||||
dbResult = dbCtx
|
||||
.DbSetArticoli
|
||||
.AsNoTracking()
|
||||
.Where(x => (azienda == "*" || x.Azienda.ToUpper() == azienda.ToUpper()) && (string.IsNullOrEmpty(searchVal) || x.CodArticolo.Contains(searchVal) || x.DescArticolo.Contains(searchVal) || x.Disegno.Contains(searchVal)))
|
||||
.OrderBy(x => x.CodArticolo)
|
||||
.Take(numRecord)
|
||||
.ToList();
|
||||
dbResult = await dbCtx
|
||||
.DbSetArticoli
|
||||
.AsNoTracking()
|
||||
.Where(x => (azienda == "*" || x.Azienda.ToUpper() == azienda.ToUpper()) && (string.IsNullOrEmpty(searchVal) || x.CodArticolo.Contains(searchVal) || x.DescArticolo.Contains(searchVal) || x.Disegno.Contains(searchVal)))
|
||||
.OrderBy(x => x.CodArticolo)
|
||||
.Take(numRecord)
|
||||
.ToListAsync();
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
@@ -1891,15 +1891,15 @@ namespace MP.Data.Controllers
|
||||
/// Recupero Odl CORRENTI
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<ODLModel> OdlGetCurrent()
|
||||
public async Task<List<ODLModel>> OdlGetCurrentAsync()
|
||||
{
|
||||
List<ODLModel> dbResult = new List<ODLModel>();
|
||||
using (var dbCtx = new MoonProContext(options))
|
||||
{
|
||||
dbResult = dbCtx
|
||||
.DbSetODL
|
||||
.Where(x => x.DataInizio != null && x.DataFine == null)
|
||||
.ToList();
|
||||
dbResult = await dbCtx
|
||||
.DbSetODL
|
||||
.Where(x => x.DataInizio != null && x.DataFine == null)
|
||||
.ToListAsync();
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user