Browse Source
Merge pull request #181 from dotnet-architecture/resolve-179/convert-to-list-before-deleting
Adding ToList to IReadOnlyCollection used in foreach
main
Eric Fleming
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
src/ApplicationCore/Services/BasketService.cs
|
|
|
@ -43,7 +43,7 @@ namespace Microsoft.eShopWeb.ApplicationCore.Services |
|
|
|
{ |
|
|
|
var basket = await _basketRepository.GetByIdAsync(basketId); |
|
|
|
|
|
|
|
foreach (var item in basket.Items) |
|
|
|
foreach (var item in basket.Items.ToList()) |
|
|
|
{ |
|
|
|
await _basketItemRepository.DeleteAsync(item); |
|
|
|
} |
|
|
|
|