Minor fix to async issue on empty cart
This commit is contained in:
parent
0ae07188fc
commit
be43dda0f5
|
|
@ -76,7 +76,7 @@ namespace MusicStore.Models
|
||||||
return itemCount;
|
return itemCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async void EmptyCart()
|
public async Task EmptyCart()
|
||||||
{
|
{
|
||||||
var cartItems = await _dbContext
|
var cartItems = await _dbContext
|
||||||
.CartItems
|
.CartItems
|
||||||
|
|
@ -147,7 +147,7 @@ namespace MusicStore.Models
|
||||||
order.Total = orderTotal;
|
order.Total = orderTotal;
|
||||||
|
|
||||||
// Empty the shopping cart
|
// Empty the shopping cart
|
||||||
EmptyCart();
|
await EmptyCart();
|
||||||
|
|
||||||
// Return the OrderId as the confirmation number
|
// Return the OrderId as the confirmation number
|
||||||
return order.OrderId;
|
return order.OrderId;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue