XPQueryExtensions.Query<T>(IDataLayer) Method
Creates a new XPQuery<T> instance from a specified session’s scope.
Namespace: DevExpress.Xpo
Assembly: DevExpress.Xpo.v24.1.dll
NuGet Packages: DevExpress.Win.PivotGrid, DevExpress.Win.TreeMap, DevExpress.Xpo
NuGet Package: DevExpress.Xpo
Declaration
Parameters
Name | Type | Description |
---|---|---|
layer | IDataLayer | An IDataLayer object specifying the data access layer. |
Type Parameters
Name |
---|
T |
Returns
Type | Description |
---|---|
XPQuery<T> | An XPQuery<T> object instantiated from the session‘s scope. |
Remarks
Example:
using System.Linq;
using DevExpress.Xpo;
// ...
var data = from c in session1.Query<Person>()
where c.LastName.StartsWith("A")
select c;
See Also