XPO - v18.2 and What You Can Expect in mid-November

XPO Team Blog
14 September 2018

Your feedback counts!

As part of our ongoing commitment to support the needs of our XPO customers, the upcoming v18.2 release will ship with several new features. Many of them are inspired directly by customer feedback!

If you are an active DevExpress Universal subscriber and would like to test these features prior to its official release, please email our support team at support@devexpress.com or rather create a separate private ticket in the Support Center. With that, we can verify your account and provide you with a v18.2 preview installation privately.

If you are using a trial and want to use these features today, you can purchase a DevExpress Universal license online (this will give you access to early builds such as this CTP). If you own a non-Universal subscription and are ready to upgrade, email us at clientservices@devexpress.com for preferential upgrade pricing.

By providing early build access, we hope to find out whether our new features and solutions address your requirements and issues. Your testing efforts and your feedback help us deliver the best possible final implementation. We have described other benefits of this cooperation in this post.

In advance, thank you very much for your help!

Easy Way to Map a Property to a Read-Only Database Column

This is a highly requested feature - FetchOnlyAttribute. Applied to a class property or field, this attribute indicates that you can only read values from a database. XPO will not include these values in INSERT and UPDATE SQL statements. A detailed description was published in this blog post.

XPO for .NET Core / .NET Standard 2.0 Is Out of Beta and Related Enhancements

Persistent object JSON serialization makes it easy to use XPO as a Data Access layer in an ASP.NET Core Web API service. You no longer need to manually format JSON responses or make a POCO copy of each persistent class. For more information, refer to our example on GitHub.

For this release, we also worked on several features that we could make available in v18.1 as well:

At this stage, we moved XPO for .NET Core /.NET Standard 2.0 out of Beta and officially released it. All in all, XPO for .NET Core is ready for production. It nearly identical to XPO for the full .NET Framework (the 1% difference relates to some #ifdefs).

New XPO Data Source for XtraReports

XPObjectSource - is a new first-class citizen in DevExpress Reporting and is used to reduce the amount of code to bind reports with XPO data. The following examples illustrate the current approach with XPCollection and other general-purpose XPO data sources: E1845 | E3169.

XPObjectSource can be used at design time via the Report Wizard:

or dynamically, in code:

ReflectionDictionary dictionary = new ReflectionDictionary();
XPClassInfo classInfo = dictionary.QueryClassInfo(typeof(Entities.Products));
XPObjectSource dataSource = new XPObjectSource() {
	ConnectionStringName = "ConnectionString",
	EntityType = classInfo
};

using(XtraReport2 report = new XtraReport2()) {
	report.DataSource = dataSource;
	// ...
	// Preview the report or do something else.
	// ..
}

More flexibility to manage connection to a database in the ORM Data Model Wizard

You can now store the connection string in the configuration file instead of the model's code. It is less error-prone and safer. 

In the Works

There are a couple of things not mentioned in the Roadmap, but we hope to have them ready by the end of 2018 or in our next release:

  • Async API support for lengthy DB-intensive operations in XPO (powered by .NET 4.5 with C# 5);
  • Simplified SetPropertyValue, GetPropertyValue, GetCollection, GetList and other APIs in demos, documentation, code examples. Thanks to .NET’s Caller Information feature, we no longer need to pass the property name as a parameter.

Things from our hot backlog for discussion

In addition to important features like Migrations, there are a number of relatively easy to do usability features that are on our radar:

  • A family of methods like "FindFirstObject<ClassType>(CriteriaOperator criterion, SortingCollection sorting, bool selectDeleted, bool force)" with parameters like XPClassInfo, SortProperty instead of SortCollection, etc.;
  • Force all Oracle connection providers to take the ObjectOwner value into consideration when a database schema is generated;
  • An easier way to clear all objects from XPCollection - for instance, the RemoveAll method (T512390);
  • Ensure that all internal tests pass for MS SQL Server 2017 and update corresponding documentation;
  • Implement the ICustomFunctionOperatorConvertibleToExpression and ICustomFunctionOperatorCompileable interfaces for the IsInstanceOfType and IsExactType functions so that they can be converted to LINQ expressions.
  • AutoCreateOption.SchemaAlreadyExists only for certain persistent classes or SQL Synonyms support (T544848 | T630869).

If you comment on these or on other features you consider important, please include specific use-case scenarios, previous ticket IDs, current solutions and their costs. This will help us prioritize our finite resources better.

Interesting Support Center tickets

  • We bypassed another Mono issue with System.Data.SqlClient and System.Drawing.Common assemblies in a Xamarin app (T661502 | T643780);
  • We clarified that it's a significant task to implement custom Server Mode/Instant Feedback providers and collected all relevant information in one place (S19875).
  • If XPQuery contains non-persistent properties, we throw an exception that lists them (to help you diagnose the root cause of these errors). We also described possible solutions if such non-persistent properties are used intentionally (T523335).
  • We discussed ways to diagnose the "Reentrancy or cross thread operation detected" error (T419520);
  • We discussed that ExplicitLoadingAttribute has no impact on collection-type properties and ways to pre-load collections together with the master object (T672387);
  • We discussed how to store and manipulate data in memory with InMemoryDataStore and copy it between data stores (T671249).
Find more interesting customer questions and product enhancements for your favorite products in the DevExpress Support Center (expand the "Frameworks (XAF & XPO)" group on the right) and What's New documentation (see resolved issues). 

XPO is in the Real World

See how we use XPO internally and how you too can leverage its flexibility and performance within your enterprise.

Love XPO and want to help us promote it? Add the package through Nuget.org instead of DevExpress Nuget!

Free DevExpress Products - Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We'll be happy to follow-up.
No Comments

Please login or register to post comments.