API

Posted by Community Admin on 03-Aug-2018 02:56

API

All Replies

Posted by Community Admin on 23-Apr-2010 00:00

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?

Posted by Community Admin on 23-Apr-2010 00:00

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.

This thread is closed