.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

XPBaseCollection.ResolveSession Event

Enables the collection to be associated with a session.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v21.2.dll


public event ResolveSessionEventHandler 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.


The ResolveSession event is raised when the collection whose XPBaseCollection.Session property isn’t specified, requests a session that represents a data store where persistent objects are stored. Handle this event to associate the collection with a session. This can be useful when you create a collection at design time and want to associate it with a session (unit of work) created at runtime.

If the session isn’t specified, the collection works with the default session (Session.DefaultSession).


Do not change the collection’s XPBaseCollection.Session property manually in code, as it is intended to provide design-time support for the component. A session that the collection will work with can be initialized in the XPCollection‘s constructor or within the ResolveSession event handler.

See Also