public async Task <List <GetAllIngredientsResponseModel> > GetAll() { var ingredients = await _ingredientRepository.GetList(); var mappedIngredients = _mapper.Map <List <GetAllIngredientsResponseModel> >(ingredients); return(mappedIngredients); }
public IDataResult <List <Ingredients> > GetAll() { var result = _ingredientRepository.GetList(); return(new SuccessDataResult <List <Ingredients> >(result.ToList())); }