public ActionResult Comment(int id) { if (IsAdmin()) { ViewBag.IsAdmin = true; } else { ViewBag.IsAdmin = false; } return(PartialView("_CommentPartial", _logic.GetComments(id))); }
public async Task <ActionResult <List <Comment> > > GetComments(int discussionid) { List <Comment> comments = await _forumLogic.GetComments(discussionid); if (comments == null) { return(StatusCode(404)); } if (comments.Count == 0) { return(StatusCode(204)); } StatusCode(200); return(comments); }