eXpress Persistent Objects - Early Access Preview (v19.2)

XPO Team Blog
19 August 2019

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-chargeIf 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.

Known Issue in EAP v19.2.NET Core 3.0 Desktop - XPInstantFeedbackView is missing in the assembly.

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), XPO users can now implement custom aggregates. You can use them to query data with XPQuery and with data sources that support CriteriaOperator (including server mode collections).

// Criteria string for a custom aggregate with a detail collection property or Free Joins.

// Specific criteria string examples for the Orders collection and the CountDistinct and STDEVP custom aggregates.
"[Orders][].CountDistinct([ProductName])", "[Orders][].STDEVP([Price])"

// 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 and online documentation at Custom Aggregate Functions.

Using NuGet? Our unified .NET installer automatically configures the Local NuGet feed for you.

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.

For more information, please refer to these WinForms samples on GitHub: Runtime, Design-Time.

Your Feedback Matters!

Your thoughts and perspectives are always appreciated. Please use the comments section below, create a new Support Center ticket or email to engage us.
We know you’re busy, but we ask that you take a moment out of your schedule to answer the survey questions below. Thanks in advance for your participation.
NOTE: Early Access and CTP builds are provided solely for early testing purposes and are not ready for production use. This build can be installed side by side with other major versions of DevExpress products. Please backup your project and other important data before installing Early Access and CTP builds.

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.