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

API

2 posts, 1 answered
  1. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    23 Apr 2010
    Link to this post
    Whats the deal with SF and the OpenAccess API?

    Is there an embedded ObjectScope provider somwhere to run extent linq queries against?  Do you guys have a ready-made scope to use that unloads itself?

    ...do we not have to worry about that?
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    23 Apr 2010
    Link to this post
    Hello Steve,

    We have our wrapper for Linq - Linq to Sitefinity. You can take a look at the developer manual to see how to use Linq queries with our Manager classes to retrieve data. Bellow are a couple of quick examples of using Linq queries with the managers:
    var manager = ContentManager.GetManager();
    var item = manager.GetContent().Where(t => t.Title == "Content Title").FirstOrDefault();
    if (item != null)
    {
        Response.Write(item.Author);
    }


    using Telerik.Sitefinity.Modules.Blogs;
    using Telerik.Sitefinity.Blogs.Model;
    ..
    var manager = BlogsManager.GetManager();
    var posts = manager.GetBlogPosts().Where(t => t.Parent.Title == "MyBlog");
    posts = posts.Where(t => t.DateCreated == DateTime.Today.AddDays(-30));

    Greetings,
    Radoslav Georgiev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
    Answered
2 posts, 1 answered