Исправил ошибку
This commit is contained in:
parent
1ed3ef3469
commit
10d5cc612a
@ -55,7 +55,21 @@ namespace CarCenterDataBaseImplement.Implemets
|
|||||||
return new();
|
return new();
|
||||||
}
|
}
|
||||||
using var context = new CarCenterDataBase();
|
using var context = new CarCenterDataBase();
|
||||||
|
if (model.DateFrom.HasValue)
|
||||||
|
{
|
||||||
|
return context.Employees
|
||||||
|
.Include(x => x.Sales)
|
||||||
|
.ThenInclude(x => x.Sale)
|
||||||
|
.ThenInclude(x => x.PreSaleWorkSale)
|
||||||
|
.ThenInclude(x => x.PreSaleWork)
|
||||||
|
.Include(x => x.Inspections)
|
||||||
|
.Include(x => x.Manager)
|
||||||
|
.Where(x => x.ManagerId == model.ManagerId)
|
||||||
|
.ToList()
|
||||||
|
.Select(x => x.GetViewModel)
|
||||||
|
.ToList();
|
||||||
|
}
|
||||||
|
else if (model.ManagerId.HasValue)
|
||||||
return context.Employees
|
return context.Employees
|
||||||
.Include(x => x.Sales)
|
.Include(x => x.Sales)
|
||||||
.ThenInclude(x => x.Sale)
|
.ThenInclude(x => x.Sale)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user