コード例 #1
0
        public async Task <ActionResult> Index(long?id = 0)
        {
            var model = id > 0 ? await _questionAnswerRepository.GetAnswer(id ?? 0) : new QuestionAnswerModel();

            model.NoticeBoards = await _noticeBoardRepository.GetNoticeSelectList();

            return(View(model));
        }
コード例 #2
0
        public async Task <ActionResult> Edit(long id)
        {
            var model = await _questionsRepository.GetAnswer(id);

            model.NoticeBoards = await _noticeRepository.GetNoticeSelectList();

            return(View("Add", model));
        }