public ActionResult <IEnumerable <CategoryReadDto> > GetAllCategories() { var item = _repository.GetAllCategories(); if (item != null) { return(Ok(_mapper.Map <IEnumerable <CategoryReadDto> >(item))); } else { return(NotFound()); } }