Exemple #1
0
        public IActionResult Delete(int?Id)
        {
            var answer = _Answer.GetAnswer(Id);

            if (answer == null)
            {
                return(RedirectToAction("Index", "Question"));
            }
            return(View(answer));
        }
Exemple #2
0
        //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);
        }