public IEnumerable <SuggestionDto> GetAllSuggestions() { var allSuggestion = _suggestionRepository.GetAll().OrderByDescending(n => n.CreateTime).AsEnumerable(); //var allSuggestion = _suggestionRepository.GetAll().OrderByDescending(n => n.IsTop).ThenByDescending(n => n.CreateTime).AsEnumerable(); return(QsMapper.CreateMapIEnume <Suggestion, SuggestionDto>(allSuggestion)); }
public IActionResult Index() { var suggestion = suggestionRepository.GetAll(); return(View(suggestion)); }
public Suggestion[] GetAllSuggestions([FromRoute] string userId) { Logger.Info(this, $"All suggestions are being retrieved for user {userId}"); return(_suggestionRepository.GetAll(userId)); }