//[HttpPost] //public void CreateComment(int postId, string commentText) //{ // PostComment comment = new PostComment(); // comment.BlogpostId = postId; // comment.DateOfComment = DateTime.Now; // comment.TextComment = commentText; // comment.UserId = Convert.ToInt32(User.Identity.GetUserId()); // CommentRepo.Save(comment); // CommentRepo.Commit(); //} //[HttpPost] //public void DeleteComment(int id) //{ // CommentRepo.Delete(id); // CommentRepo.Commit(); //} protected override void Dispose(bool disposing) { if (disposing) { Repo.Dispose(); } base.Dispose(disposing); }