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)); } }
public IHttpActionResult PUT(QuestionVM VM) { return(Ok(_adapter.EditQuestion(VM))); }