diff --git a/IceCreamShop/IceCreamShopDatabaseImplement/Implements/OrderStorage.cs b/IceCreamShop/IceCreamShopDatabaseImplement/Implements/OrderStorage.cs index 5438d17..d743214 100644 --- a/IceCreamShop/IceCreamShopDatabaseImplement/Implements/OrderStorage.cs +++ b/IceCreamShop/IceCreamShopDatabaseImplement/Implements/OrderStorage.cs @@ -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