Beispiel #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);
        }
Beispiel #2
0
        public async Task <IEnumerable <IngredientDto> > GetIngredientsAsync()
        {
            var ingredients = await _ingredientRepository.GetAllAsync();

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