Beispiel #1
0
        public void EmptyBasket(BasketViewModel basket)
        {
            var product = productRepository.GetAllProducts().Count();

            if (product >= 1)
            {
                basket.ClearBasket();
            }
        }
Beispiel #2
0
        public async Task <Order> SubmitOrder(BasketViewModel basket, int orderId)
        {
            if (basket != null)
            {
                basket.ClearBasket();
            }

            var order = orderRepository.GetOrderById(orderId);

            if (order == null)
            {
                return(null);
            }

            await emailSender.SendOrderConfirmationEmail(order);

            return(order);
        }