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");
        }
예제 #2
0
 public void UpdateComment(Comment comment)
 {
     Comment original = GetCommentById(comment.Id);
 }
예제 #3
0
 public void AddComment(Comment comment)
 {
     context.Comments.Add(comment);
 }