public PartialViewResult AddComment(AddCommentViewModel vm) { if (ModelState.IsValid) { Comment comment = new Comment { AccountId = Convert.ToInt32(GetSUD()), Active = 1, Created = DateTime.Now, Comment1 = vm.Comment, EntryId = vm.EntryId }; Rep.AddComment(comment); Rep.Save(); return PartialView("Success"); } return PartialView("Error"); }
public void UpdateComment(Comment comment) { Comment original = GetCommentById(comment.Id); }
public void AddComment(Comment comment) { context.Comments.Add(comment); }