コード例 #1
0
ファイル: QuestionService.cs プロジェクト: Viktor5528/Quiz
        public int Update(UpdateQuestionRequestModel model)
        {
            var question = _repo.GetById(model.Id);

            question.Text       = model.Text;
            question.Complexity = model.Complexity;
            question.Theme      = (Theme)model.Theme;
            return(_repo.Update(question));
        }
コード例 #2
0
ファイル: QuestionController.cs プロジェクト: Viktor5528/Quiz
 public IActionResult Update(UpdateQuestionRequestModel model)
 {
     return(Ok(_question.Update(model)));
 }