public ActionResult EditComment(int id, string id2) { CommentBll commentBll = new CommentBll(); if (Session["userId"] == null) { return new ContentResult() { Content = "false" } } ; Models.Comment comment = commentBll.GetCommentById(id); if (comment == null) { return new ContentResult() { Content = "false" } } ; string usernameString = Session["userId"].ToString(); int discriminator = int.Parse(usernameString.Split('-')[0]); string username = usernameString.Split('-')[1]; if (comment.username != username || comment.discriminator != discriminator) { return new ContentResult() { Content = "false" } } ; commentBll.EditCommentById(id, id2); return(new ContentResult() { Content = "true" }); }