Пример #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)));
 }