PIbd-21. Rodionov I.A. Lab work 06. Hard #14
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user