Exemplo n.º 1
0
        /// <summary>
        /// Get all ingredients
        /// </summary>
        /// <returns>List of Ingredients ></returns>
        public async Task <List <Ingredients> > GetAllIngredients()
        {
            IIngredientRepository _ingredients = _db.GetRepository <IIngredientRepository>();

            List <Ingredients> ingredients = (await _ingredients.GetAllAsync()).ToList();

            return(ingredients);
        }
Exemplo n.º 2
0
        public async Task <IEnumerable <IngredientDto> > GetIngredientsAsync()
        {
            var ingredients = await _ingredientRepository.GetAllAsync();

            return(_mapper.Map <IEnumerable <IngredientDto> >(ingredients));
        }
Exemplo n.º 3
0
 public async Task <List <Ingredient> > GetAllIngredientAsync()
 {
     return(await _ingredientRepository.GetAllAsync());
 }