public JsonResult SviReply(int suggestionId) { try { SupportSystemEntities DB = new SupportSystemEntities(); var reply = DB.Comments.Where(x => x.SuggestionID == suggestionId && x.ParentId != null).Select(s => new { s.CommentText, s.CommentDate, s.UserID, s.CommentID, s.ParentId, s.Username }).ToArray(); return(Json(reply, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { return(Json(ex, JsonRequestBehavior.AllowGet)); } }
public MainLogic() { DB = new SupportSystemEntities(); }