private async Task ApplyChanges(ShoppingCart cart) { cart.Total = Math.Round(cart.LineItems.Sum(l => l.Total), 2, MidpointRounding.ToPositiveInfinity); cart.SubTotal = Math.Round(cart.LineItems.Sum(l => l.SubTotal), 2, MidpointRounding.ToPositiveInfinity); await _repository.SaveShoppingCart(_mapper.Map <ShoppingCartEntity>(cart)); }