Skip to main content
.NET 6.0+

DevExpress v24.1 Update — Your Feedback Matters

Our What's New in v24.1 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

Object Parameters

Object parameters are supported for legacy compatibility. XPO natively supports serialization/deserialization of persistent objects to/from strings. When serializing a persistent object, all conversions are performed automatically. When deserializing an object, you need to provide a session, which will be used to restore the object. For this purpose, use the Session.ParseCriteria method instead of CriteriaOperator.Parse. If you already have code that uses the regular CriteriaOperator.Parse method, you can wrap the method call with Session.CreateParseCriteriaSessionScope.

using(mySession.CreateParseCriteriaSessionScope()) {
    //...
    CriteriaOperator.Parse("...");
    //...
}

In this instance, the existing CriteriaOperator.Parse method will correctly restore persistent objects in the “mySession” session.