As you probably know by now, we expect to release v19.2 within the next few months. The goal of this blog post is to share our newest XPO-specific features and give you the opportunity to test new functionality before we wrap up our current dev cycle.
XPO is available free-of-charge. If you own an active Universal or DXperience subscription, you can download the preview build from the DevExpress Download Manager and test the features described in this blog post. . Once you do, please take a moment tell us whether these new features address your business needs. This will help us fine-tune our code before official launch.
.NET Core 3.0 Desktop SDK Support for WinForms and WPF Apps
XPO for .NET Core 3.0 WinForms and WPF apps can be added using the DevExpress.WindowsDesktop.* packages from our NuGet feed. For more information, please read this recent blog post.
ORM Data Model Designer & LINQ Enhancements
Our designer can now store connection strings in appsettings.json, generate JSON serialization and Dependency Injection extensions (all of which are very important for .NET Core projects). We also gave the designer a slight face-lift, added more meaningful error messages/text, and introduced support for SelectMany and WithDeleted methods in XPQuery. For more information, please read this recent blog post.
Custom Aggregates for collections of persistent objects
In addition to predefined aggregates (Sum, Count, Min, Max, Avg, Single, Exists),
// Criteria string for a custom aggregate with a detail collection property or Free Joins. YourCollection.YourCustomAggregate(YourNestedProperty) // Criteria string for a custom aggregate with a top-level collection of persistent objects. [].CUSTOM_AGGREGATE('YourCustomAggregate', YourNestedProperty) // LINQ to XPO usage of custom aggregates (CountDistinct and STDEVP) with a detail collection property. new XPQuery<Customer>(theSession) .Select(t => new { ContactName = t.ContactName, CountDistinct = CountDistinctCustomAggregate.CountDistinct( t.Orders, o => o.ProductName ), QuantityVariance = STDEVPCustomAggregate.STDEVP( t.Orders, o => o.Quantity ), PriceVariance = STDEVPCustomAggregate.STDEVP( t.Orders, o => o.Price ), }).OrderBy(t => t.ContactName).ToList();
To create a custom aggregate, implement the following interfaces: ICustomAggregate, ICustomAggregateQueryable, ICustomAggregateFormattable. To register a custom aggregate, use the CriteriaOperator.RegisterCustomAggregate method - method - nearly the same process as that used when creating a custom criteria function.
For more information, please refer to this WinForms sample on GitHub.
XPO Data Source for DevExpress Dashboard
We created the DevExpress.DashboardCommon.DashboardXpoDataSource component to help XPO users bind their persistent class data to DevExpress Dashboard (DevExpress Dashboard is part of the Universal Subscription). You can configure the new component in code or use the built-in dashboard designer.