コード例 #1
0
        public virtual ActionResult List(int questionId, AnswerDataSource datasource = null)
        {
            datasource.Data = Mapper.Map <List <AnswerViewModel> >(_answersRepository.GetList(questionId));
            datasource.Initialize();

            var question = _questionsRepository.GetById(questionId);

            datasource.QuestionId      = questionId;
            datasource.QuestionText    = question.Text;
            datasource.QuestionnaireId = question.QuestionnaireId;


            return(View(datasource));
        }
コード例 #2
0
 public virtual ActionResult DataSource(AnswerDataSource datasource)
 {
     return(List(datasource.QuestionId, datasource));
 }