From 8bf9fbd296aa72c37b788d8af7db9bea7b168a7c Mon Sep 17 00:00:00 2001 From: VictoriaPresnyakova Date: Mon, 20 Mar 2023 21:23:35 +0400 Subject: [PATCH] =?UTF-8?q?=D0=BB=D0=BE=D0=B3=D0=B8=D0=BAa=20=D0=BF=D0=BE?= =?UTF-8?q?=D0=BB=D1=83=D1=87=D0=B5=D0=BD=D0=B8=D1=8F=20=D1=81=D0=BF=D0=B8?= =?UTF-8?q?=D1=81=D0=BA=D0=B0=20=D1=84=D0=B8=D0=BB=D1=8C=D1=82=D1=80=D0=BE?= =?UTF-8?q?=D0=B2=D0=B0=D0=BD=D0=BD=D1=8B=D1=85=20=D0=B7=D0=B0=D0=BA=D0=B0?= =?UTF-8?q?=D0=B7=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- JewelryStoreFileImplement/Implements/OrderStorage.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/JewelryStoreFileImplement/Implements/OrderStorage.cs b/JewelryStoreFileImplement/Implements/OrderStorage.cs index a9118fb..1ad73b1 100644 --- a/JewelryStoreFileImplement/Implements/OrderStorage.cs +++ b/JewelryStoreFileImplement/Implements/OrderStorage.cs @@ -49,12 +49,9 @@ namespace JewelryStoreFileImplement.Implements { if (!model.DateFrom.HasValue || !model.DateTo.HasValue) { - return source.Orders - .Where(x => x.DateCreate >= model.DateFrom && x.DateCreate <= model.DateTo) - .Select(x => x.GetViewModel) - .ToList(); + return new(); } - return source.Orders.Where(x => x.Id == model.Id).Select(x => x.GetViewModel).ToList(); + return source.Orders.Where(x => x.DateCreate >= model.DateFrom && x.DateCreate <= model.DateTo).Select(x => x.GetViewModel).ToList(); } public List GetFullList()