Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Collapse]Cross-Platform Core Libraries
 [Collapse]DevExpress ORM Tool
  [Expand]Product Information
  [Expand]Getting Started
  [Expand]Fundamentals
  [Collapse]Feature Center
   [Expand]Data Representation
   [Expand]Object Relational Mapping
   [Expand]Connecting to a Data Store
   [Expand]Data Exchange and Manipulation
   [Collapse]Querying a Data Store
     Creating Criteria
     Direct SQL Queries
     Filtering
     Free Joins
     Limitations of CriteriaOperator.Parse
     LINQ to XPO
     LINQPad Context Driver
     Sorting
     Stored Procedures
   [Expand]Using XPO in Web Applications
  [Expand]Concepts
  [Expand]Design-Time Features
  [Expand]Examples
  [Expand]Member Tables
 [Expand]DevExpress Data Library
 [Expand]Miscellaneous
 [Expand]API Reference
[Expand]Tools and Utilities
 End-User Documentation

LINQ to XPO

XPO includes the XPQuery<T> class tailored for constructing LINQ expressions against persistent objects.

You have the following options to create XPQuery<T> instances.

In addition to calling the XPQueryExtensions.Query<T> extension method, you can call the XPQueryExtensions.QueryInTransaction<T> method to include all in-memory object changes to query results (as if Session.InTransactionMode is enabled). To create an InTransaction XPQuery<T> instance based on an existing XPQuery<T> instance, call its XPQuery<T>.InTransaction method.

Expanded Sample Expressions

Note

You can find a sample project in the LINQ to XPO Knowledge Base article. You should have Visual Studio 2008 and SQL Server 2005 or 2000 with the Northwind demo database.

To learn how to implement custom functions and criteria, and use them in LINQ to XPO expressions, see How to: Implement Custom Functions and Criteria in LINQ to XPO.

Expanded LINQ to XPO Limitations

  • The maximum number of total or group summaries allowed is 14.
  • The FirstOrDefault method is not supported for property initialization in the Select statement.
  • Cross Join queries are not supported.

Expanded See Also

How would you rate this topic?​​​​​​​