Changing DbSet<T>.Remove -> RemoveRange()
This commit is contained in:
parent
3e82cbc052
commit
0d673eafc9
|
|
@ -78,7 +78,7 @@ namespace MusicStore.Models
|
|||
public void EmptyCart()
|
||||
{
|
||||
var cartItems = _dbContext.CartItems.Where(cart => cart.CartId == ShoppingCartId).ToArray();
|
||||
_dbContext.CartItems.Remove(cartItems);
|
||||
_dbContext.CartItems.RemoveRange(cartItems);
|
||||
}
|
||||
|
||||
public async Task<List<CartItem>> GetCartItems()
|
||||
|
|
|
|||
Loading…
Reference in New Issue