Добавил выборку в получение списка заказов

This commit is contained in:
Илья 2024-05-20 11:55:16 +04:00
parent 7999acb673
commit 686bf6a304

View File

@ -53,6 +53,16 @@ namespace IceCreamShopDatabaseImplement.Implements
.Select(x => x.GetViewModel)
.ToList();
}
else if (model.ImplementerId.HasValue && model.Status != null)
{
return context.Orders
.Include(x => x.IceCream)
.Include(x => x.Client)
.Include(x => x.Implementer)
.Where(x => x.ImplementerId == model.ImplementerId && x.Status.Equals(model.Status))
.Select(x => x.GetViewModel)
.ToList();
}
else if (model.ImplementerId.HasValue)
{
return context.Orders