public AddPost ( JustBlog.Core.Objects.Post post ) : int | ||
post | JustBlog.Core.Objects.Post | |
리턴 | int |
public int AddPost(Post post)
{
using (var tran = _session.BeginTransaction())
{
_session.Save(post);
tran.Commit();
return post.Id;
}
}