public async Task <ActionResult <IEnumerable <IngredientDto> > > GetIngredientsAsync([FromQuery] ResourceParameters.Ingredients ingredientsResourceParameters)
        {
            var ingredientEntities = await _ingredients.GetListAsync(ingredientsResourceParameters);

            var ingredientDtosList = _mapper.Map <IEnumerable <IngredientDto> >(ingredientEntities);

            return(Ok(ingredientDtosList));
        }
Beispiel #2
0
 public async Task <IEnumerable <Ingredient> > GetListAsync(ResourceParameters.Ingredients ingredientsResourceParameters)
 {
     return(await _dal.GetListAsync(ingredientsResourceParameters));
 }