Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
        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));
        }