예제 #1
0
        public ActionResult Edit(int id, Question editQuestion, IFormCollection collection)
        {
            try
            {
                _questionRepo.EditQuestion(editQuestion);

                return(RedirectToAction(nameof(Index)));
            }
            catch (Exception ex)
            {
                _logger.LogError($"Failed to edit a question: {ex}");
                return(View(editQuestion));
            }
        }
예제 #2
0
 public IHttpActionResult PUT(QuestionVM VM)
 {
     return(Ok(_adapter.EditQuestion(VM)));
 }