Exemplo n.º 1
0
        public async Task <IActionResult> CreateQuestion(CreateOrEditQuestionViewModel model)
        {
            if (ModelState.IsValid)
            {
                var question = Mapper.Map <EvaluationQuestion>(model);
                await _evaluationManager.CreateQuestionAsync(question);

                Notifier.Success("你已成功创建了一条新的技术评测问题记录!");
                return(RedirectToAction(nameof(Questions), new { model.EvaluationId, model.SubjectId }));
            }
            return(View(model));
        }