public static QuestionSearchResultViewModel Map(SearchResult<Question> model)
 {
     var viewModel = new QuestionSearchResultViewModel();
     viewModel.Questions = model.ResultsCount > 0
         ? model.Results.Select(QuestionMapper.Map)
         : null;
     return viewModel;
 }
Пример #2
0
        public static QuestionSearchResultViewModel Map(SearchResult <Question> model)
        {
            var viewModel = new QuestionSearchResultViewModel();

            viewModel.Questions = model.ResultsCount > 0
                ? model.Results.Select(QuestionMapper.Map)
                : null;
            return(viewModel);
        }