public IActionResult Delete(int?Id) { var answer = _Answer.GetAnswer(Id); if (answer == null) { return(RedirectToAction("Index", "Question")); } return(View(answer)); }
//public IQueryable<Anreply> GetAnreplyByAnswerId(int id) //{ // var answer = db.Anreply.Include("Ancomment").Where(o => o.AnswerId == id); // return answer; //} public IEnumerable <Answer> GetAnswer() { var answer = ianswer.GetAnswer(); return(answer); }