Completo implementazione base porting OrdeRow a servizio a se

This commit is contained in:
Samuele Locatelli
2026-03-18 12:44:27 +01:00
parent 274f0ed3ae
commit 35ba495030
6 changed files with 171 additions and 68 deletions
@@ -94,6 +94,26 @@ namespace EgwCoreLib.Lux.Data.Repository.Sales
.ToListAsync();
}
public async Task<List<OrderRowModel>> GetByStateAsync(OrderStates reqState, DateTime dtStart, DateTime dtEnd)
{
await using var dbCtx = await CreateContextAsync();
return await dbCtx.DbSetOrderRow
.Where(x => x.OrderRowState == reqState && x.Inserted >= dtStart && x.Inserted <= dtEnd)
.Include(r => r.SellingItemNav)
.AsNoTracking()
.ToListAsync();
}
public async Task<List<OrderRowModel>> GetByStateMinAsync(OrderStates reqState, DateTime dtStart, DateTime dtEnd)
{
await using var dbCtx = await CreateContextAsync();
return await dbCtx.DbSetOrderRow
.Where(x => x.OrderRowState >= reqState && x.Inserted >= dtStart && x.Inserted <= dtEnd)
.Include(r => r.SellingItemNav)
.AsNoTracking()
.ToListAsync();
}
public async Task<OrderRowModel?> GetByUidAsync(string OrderRowUid)
{
await using var dbCtx = await CreateContextAsync();