Thanks for the quick reply.
I have used your code and it adds a comment, the problem now is it does not link to the blog post
I have attached a screenshot with the comments, when I click on Link to commented item, it just refreshes the page.
My code looks like this now
BlogPost blogPost = App.WorkWith().BlogPosts().Where( b => ( b.Parent.Title ==
) && ( b.Title ==
"New Blog Post"
var manager = BlogsManager.GetManager();
var provider = ( ContentDataProviderBase )manager.Provider;
var comment = provider.CreateComment( ( ICommentable )blogPost );
"this is the content of my comment"
comment.Owner = SecurityManager.GetCurrentUserId();
comment.CommentStatus = CommentStatus.Published;
I have also attached a screenshot of my blogs to show that the blog does exist