Example #1
0
        // Adding dish item to BasketDishes
        public async Task AddBasketDishItemAsync(string basketId, int quantity, string dishId)
        {
            var basketDish = new BasketDish()
            {
                BasketId = basketId,
                Quantity = quantity,
                DishId   = dishId,
            };

            await this.basketDishRepository.AddAsync(basketDish);

            await this.basketDishRepository.SaveChangesAsync();
        }
Example #2
0
 // Adding quantity to existing dish
 public async Task AddQuantityToExistingDishAsync(BasketDish basketDish, int quantity)
 {
     basketDish.Quantity += quantity;
     await this.basketDishRepository.SaveChangesAsync();
 }