XPQueryExtensions.QueryInTransaction<T>(Session) Method
In This Article
Creates a new XPQuery<T> instance with the InTransaction (XPQuery<T>.InTransaction) mode enabled, from a specified session’s scope.
Namespace: DevExpress.Xpo
Assembly: DevExpress.Xpo.v24.2.dll
NuGet Package: DevExpress.Xpo
#Declaration
#Parameters
Name | Type | Description |
---|---|---|
session | Session | A Session object or its descendant, which instantiates an XPQuery |
#Type Parameters
Name |
---|
T |
#Returns
Type | Description |
---|---|
XPQuery<T> | An XPQuery |
#Remarks
Example:
using System.Linq;
using DevExpress.Xpo;
// ...
var data = from c in session1.QueryInTransaction<Person>()
where c.LastName.StartsWith("A")
select c;
See Also