Ejemplo n.º 1
0
        public async Task <OrderModel> AddOrderAsync(OrderModel model)
        {
            var cofffee = await _CoffeeRepository.GetCoffeeByIdAsync(model.CoffeeId);

            model.PickupTime = model.PickupTime.AddMinutes(cofffee.PreparationTime);
            var order = await _orderRepository.CreateOrderAsync(model);

            return(order);
        }
 public async Task <CoffeeModel> GetCoffeeByIdAsync(int id)
 {
     return(await _repo.GetCoffeeByIdAsync(id));
 }