public int MoveDiscussionPost(string ticket, int postid, int targetid) { using (SnCore.Data.Hibernate.Session.OpenConnection()) { ISession session = SnCore.Data.Hibernate.Session.Current; ManagedSecurityContext sec = new ManagedSecurityContext(session, ticket); ManagedDiscussionPost post = new ManagedDiscussionPost(session, postid); int id = post.Move(sec, targetid); SnCore.Data.Hibernate.Session.Flush(); return(id); } }
public int MoveDiscussionPost(string ticket, int postid, int targetid) { using (SnCore.Data.Hibernate.Session.OpenConnection()) { ISession session = SnCore.Data.Hibernate.Session.Current; ManagedSecurityContext sec = new ManagedSecurityContext(session, ticket); ManagedDiscussionPost post = new ManagedDiscussionPost(session, postid); int id = post.Move(sec, targetid); SnCore.Data.Hibernate.Session.Flush(); return id; } }