Exemplo n.º 1
0
        public async Task <ActionResult <List <Meal> > > GetMeals()
        {
            try
            {
                var meals = await _mealDataModel.FindAllAsync().ConfigureAwait(true);

                return(Ok(meals));
            }
            catch (Exception ex)
            {
                _logger.LogError(ex, GetType().Name);
                throw;
            }
        }
Exemplo n.º 2
0
 public async Task <ICollection <Meal> > FindAllAsync()
 {
     return(await _mealDataModel.FindAllAsync().ConfigureAwait(false));
 }