public async Task <IActionResult> DeleteAnswer(int id) { var answer = _questionImplementation.GetAnswerById(id); var QuestionId = answer.Question.QuestionId; await _questionImplementation.DeleteAnswer(id); return(RedirectToAction("Index", "Question", new { id = QuestionId })); }