From 19415b5c7b5452cdec4267d46b0f8197145f64a3 Mon Sep 17 00:00:00 2001 From: "ns.potapov" Date: Mon, 8 Apr 2024 12:42:08 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9A=D0=B0=D0=BA=D0=B8=D0=B5=20=D1=82=D0=BE?= =?UTF-8?q?=20=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BusinessLogics/ShopLogic.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/SecuritySystem/SecuritySystemBusinessLogic/BusinessLogics/ShopLogic.cs b/SecuritySystem/SecuritySystemBusinessLogic/BusinessLogics/ShopLogic.cs index aef5e31..5f8ad8b 100644 --- a/SecuritySystem/SecuritySystemBusinessLogic/BusinessLogics/ShopLogic.cs +++ b/SecuritySystem/SecuritySystemBusinessLogic/BusinessLogics/ShopLogic.cs @@ -181,9 +181,7 @@ namespace SecuritySystemBusinessLogic.BusinessLogics public bool CheckSecuresCount(ISecureModel model, int count) { int securesInShops = _shopStorage.GetFullList() - .Select( - x => x.ShopSecures.Select(y => y.Value.Item1.Id == model.Id ? y.Value.Item2 : 0).Sum() - ).Sum(); + .Select(x => x.ShopSecures.Select(y => y.Value.Item1.Id == model.Id ? y.Value.Item2 : 0).Sum()).Sum(); return securesInShops >= count; } public bool CheckSupplySecures(ShopSearchModel shopSearchModel, int count) @@ -191,9 +189,6 @@ namespace SecuritySystemBusinessLogic.BusinessLogics if (shopSearchModel == null) throw new ArgumentNullException(nameof(shopSearchModel)); - if (secure == null) - throw new ArgumentNullException(nameof(secure)); - var shop = _shopStorage.GetElement(shopSearchModel); if (shop == null)