Skip to main content
.NET Framework 4.6.2+

XPObjectSource.ResolveSession Event

Occurs when the XPObjectSource needs a Session to retrieve objects from the data store.

Namespace: DevExpress.Xpo

Assembly: DevExpress.DataAccess.v24.2.dll

Declaration

public event EventHandler<ResolveSessionEventArgs> ResolveSession

Event Data

The ResolveSession event's data class is ResolveSessionEventArgs. The following properties provide information specific to this event:

Property Description
Session Specifies the session to be used to load and save persistent objects.

Remarks

Handle this event to supply a Session connected to the required data store. You can also handle the XPObjectSource.DismissSession event to dispose of the created session if required. In the ResolveSession event handler, you can pass an arbitrary object to the XPObjectSource.Tag property and then use this object in the DismissSession event handler.

If the ResolveSession event is not handled, the XPObjectSource instantiates a Session using settings specified via the XPObjectSource.ConnectionString or XPObjectSource.ConnectionStringName properties.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ResolveSession event.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also