Beispiel #1
0
        public async Task <List <GetAllIngredientsResponseModel> > GetAll()
        {
            var ingredients = await _ingredientRepository.GetList();

            var mappedIngredients = _mapper.Map <List <GetAllIngredientsResponseModel> >(ingredients);

            return(mappedIngredients);
        }
Beispiel #2
0
        public IDataResult <List <Ingredients> > GetAll()
        {
            var result = _ingredientRepository.GetList();

            return(new SuccessDataResult <List <Ingredients> >(result.ToList()));
        }