public ActionResult Delete(int id) { var questionId = answerFacade.GetAswerById(id).Question.Id; answerFacade.DeleteAnswer(id); return(View("View", CreateAnswerViewModel(questionId))); }
// GET: Question/Delete/5 public ActionResult DeleteAnswer(int id) { var answer = answerFacade.GetAnswerByID(id); int questionID = answer.Question.QuestionID; answerFacade.DeleteAnswer(id); return(RedirectToAction("Edit", new { questionID = questionID })); }