1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Setting ServiceProvider for BlogsManager CRUD

Setting ServiceProvider for BlogsManager CRUD

1 posts, 0 answered
  1. eduard
    eduard avatar
    1 posts
    Registered:
    19 May 2016
    10 Mar
    Link to this post

    Hello all,

    I am trying to query blog posts using CRUD, I have managed to get the basic search done.

    The problem that I am facing is that I have multiple service providers for my blogs (I have a custom service provider from here). When I ask for my blogs I only get blogs from the default provider, but I only want blogs from from the custom provider. 

    Code:

    BlogsManager blogsManager = BlogsManager.GetManager();
    List<BlogPost> blogPosblogsManagert = blogsManager.GetBlogPosts().Where(b => b.Status == ContentLifecycleStatus.Live).ToList();

    I am able to find the provider(s) inside the blog manager, but I don't understand how to set it. (blogsManager.Provider / blogsManager.AllProviders)

    Thank you,
    Eduard

1 posts, 0 answered