This article contains all changes in backward compatibility in the Sitefinity CMS 5.1 release. The introduced changes are the following:
Read the whole article for detailed information about each of the changes.
In Sitefinity CMS 5.1, some of the modules were decoupled, i.e. moved from Telerik.Sitefinity.dll to a separate assembly. News, Blogs, Lists and Events are moved to Telerik.Sitefinity.ContentModules.dll and Ecommerce is moved to Teletik.Sitefinity.Ecommerce.dll. All types are the same and the upgrades to the database and configuration are done automatically.
If you use custom controls or projects, that are using the API of the decoupled modules, you have to recompile them after applying the following changes:
For example, this code won’t be working anymore, if there is no Telerik.Sitefinity using clause:
var items = Telerik.Sitefinity.App.WorkWith().NewsItems().Where(i => i.Author ==
You must add a Telerik.Sitefinity CMS using:
var items = App.WorkWith().NewsItems().Where(i => i.Author ==
In case of using the fluent API in .ascx/.aspx files, the Telerik.Sitefinity namespace must be imported:
<%@ Control Language="C#" %>
<%@ Import Namespace="System.Linq" %>
<%@ Import Namespace="Telerik.Sitefinity.Model" %>
<%@ Import Namespace="Telerik.Sitefinity" %>
private void MyMethod()
var items = Telerik.Sitefinity.App.WorkWith().NewsItems().Where(i => i.Author == "Me");
The Sitefinity CMS team have done code optimizations in order to decrease the consumed memory and in the same time to increase the overall performance of the product. This lead to the introducing of several breaking changes in the Sitefinity CMS API. In general several properties (in-memory collections) of given classes were replaced with extension methods that return the same data via IQueryable collections. The main advantage of using the IQueryable collections when working with remote data source, is that you could perform an Out-of-Process data manipulation (filtering, paging, etc.), i.e. without the need of loading large sets of data into the memory.
Here is a list of the removed properties:
IQueryable<PageData> GetPagesByTemplate(Guid templateId)
PageManager pageManager = PageManager.GetManager();
PageTemplate template = pageManager.GetTemplate(templateId);
template.Pages().Where(p => p.Status == ContentLifecycleStatus.Live);
In case you want to get all images in given album, you must use the newly introduced Images extension method of the Album class. For more information, see For developers: Query images.
IQueryable<Image> GetImagesByAlbum(Guid albumId)
LibrariesManager librariesManager = LibrariesManager.GetManager();
Album album = librariesManager.GetAlbum(albumId);
album.Images().Where(i => i.Status == ContentLifecycleStatus.Live);
IQueryable<Video> GetVideosByVideoLibraryNativeAPI(Guid videoLibraryId)
VideoLibrary videoLibrary = librariesManager.GetVideoLibrary(videoLibraryId);
videoLibrary.Videos().Where(v => v.Status == ContentLifecycleStatus.Live);
In case you want to get all documents in given document library, you must use the newly introduced Documents extension method of the DocumentLibrary class. For more information, see For developers: Query documents.
Here is a code example:
IQueryable<Document> GetDocumentsByDocumentLibraryNativeAPI(Guid documentLibraryId)
DocumentLibrary documentLibrary = librariesManager.GetDocumentLibrary(documentLibraryId);
documentLibrary.Documents().Where(d => d.Status == ContentLifecycleStatus.Live);
The following changes and additions have been introduced in the Ecommerce module:
Back To Top
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important
Copyright © 2022 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.
Progress, Telerik, Ipswitch, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.
Powered by Progress Sitefinity