Пример #1
0
 public int AddComment(Comment c)
 {
     OpenSession();
     OpenTransaction();
     session.Save(c);
     CommitTransaction();
     CloseSession();
     return c.CommentID;
 }
Пример #2
0
        public int AddComment(Comment c, string ajaxSessionKey)
        {
            CheckRequest(ajaxSessionKey);

            CommentManager cm = new CommentManager();
            c.CreationDate = DateTime.Now;
            c.Status = Comment.CommentStatus.Approved;
            int ret = cm.AddComment(c);

            return ret;
        }