linq
This commit is contained in:
parent
fb63a12ddd
commit
03ce74e177
@ -93,10 +93,7 @@ namespace LawFirmFileImplement.Implements
|
||||
|
||||
var shopDocuments = source.Shops.SelectMany(shop => shop.ShopDocuments.Where(c => c.Value.Item1.Id == document.Id));
|
||||
|
||||
int countStore = 0;
|
||||
|
||||
foreach (var it in shopDocuments)
|
||||
countStore += it.Value.Item2;
|
||||
var countStore = shopDocuments.Sum(it => it.Value.Item2);
|
||||
|
||||
if (count > countStore)
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user