public ActionResult GetAnswerNews( int pageNumber = 1, int pageSize = DefualtPageSize) { var news = Service.GetAnswerNews(CurrentUser.Id, pageNumber, pageSize); var page = PageDataMapper.Map(news, AnswerNewsMapper.Map); page.UrlFormat = "#/NewAnswers?"; return(View("AnswerNewsPageView", page)); }
private PageDataViewModel <QuestionViewModel> LoadUserQuestions( int userId, int pageNumber, int pageSize) { var questions = Service.GetUserQuestions(userId, pageNumber, pageSize); var page = PageDataMapper.Map(questions, QuestionMapper.Map); page.UrlFormat = "#/GetUserQuestionsPage?"; return(page); }
private PageDataViewModel <ArticleViewModel> LoadUserArticles( int userId, int pageNumber, int pageSize) { var articles = Service.GetUserArticles(userId, pageNumber, pageSize); var page = PageDataMapper.Map(articles, ArticleMapper.Map); page.UrlFormat = "#/GetUserArticlesPage?"; return(page); }
private PageDataViewModel <AnswerViewModel> LoadQuestionAnswers( int questionId, int pageNumber, int pageSize) { var answers = Service.GetQuestionAnswers(questionId, pageNumber, pageSize); var page = PageDataMapper.Map(answers, AnswerMapper.Map); page.UrlFormat = String.Format("#/GetQuestionAnswers?questionId={0}&", questionId); return(page); }
private PageDataViewModel <AnswerViewModel> LoadUserAnswers( int userId, int pageNumber, int pageSize) { var answers = Service.GetUserAnswers(userId, pageNumber, pageSize); var page = PageDataMapper.Map(answers, SingleAnswerMapper.Map); page.UrlFormat = "#/GetUserAnswers?"; return(page); }
private PageDataViewModel <CommentViewModel> LoadArticleComments( int articleId, int pageNumber, int pageSize) { var comments = Service.GetArticleComments(articleId, pageNumber, pageSize); var page = PageDataMapper.Map(comments, CommentMapper.Map); page.UrlFormat = String.Format("#/GetArticleComments?articleId={0}&", articleId); return(page); }
// TODO: Refactor to avoid copy paste private PageDataViewModel <NoteViewModel> LoadUserNotes( int userId, int pageNumber, int pageSize) { var notes = Service.GetUserNotes(userId, pageNumber, pageSize); var page = PageDataMapper.Map(notes, NoteMapper.Map); page.UrlFormat = "#/GetUserNotes?"; return(page); }
private PageDataViewModel <CommentViewModel> LoadUserComments( int userId, int pageNumber, int pageSize) { var comments = Service.GetUserComments(userId, pageNumber, pageSize); var page = PageDataMapper.Map(comments, SingleCommentMapper.Map); page.AreaId = "userComments"; page.UrlFormat = "#/GetUserComments?"; return(page); }