This project is read-only.

Create Post by Inserting into Database Directly

Topics: Business Logic Layer
Jan 6, 2012 at 6:19 PM

I have used on many sites and love it. Right now I am working on a personal site and using with sql database.

I want to be able to create post be inserting directly to the Database. I notice the only two table updated when you save a post is be_Posts and be_PostCategory. But inserting into them only does not allow the post to be shown. I use the proper guid for BlogID and CategoryID and I create a new one for PostID but I do not see my post when viewing the log.

Is this possible to do and what am I missing?

Jan 6, 2012 at 7:33 PM

Application does not know you added record to the database because there is no trigger that would notify about change. It shows posts cached in memory. You'll need to restart application for new post to show up. If you just want to migrate bunch of posts to your blog that probably ok, but if you need a way to regularly add new posts, you'd better use web service call (~/admin/AjaxHelper.aspx.cs/SavePost).

Jan 6, 2012 at 7:35 PM

Yes, I noticed they would show up much later.


Thanks, will use webservice call.

Jan 8, 2012 at 12:45 AM

Where can I find more info on the said web service call?

Nov 30, 2014 at 6:46 PM

i also want the same !

@7danny, Have you find any solution ?