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)); }
public async Task <IEnumerable <Ingredient> > GetListAsync(ResourceParameters.Ingredients ingredientsResourceParameters) { return(await _dal.GetListAsync(ingredientsResourceParameters)); }