Какие то изменения

This commit is contained in:
Никита Потапов 2024-04-08 12:42:08 +04:00
parent dcba13f0ed
commit 19415b5c7b

View File

@ -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)