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));
            }
        }
Esempio n. 2
0
 public MainLogic()
 {
     DB = new SupportSystemEntities();
 }