Skip to main content
A newer version of this page is available. .
.NET Framework 4.5.2+

XPBaseCollection.Session Property

Gets or sets the Session used by the current collection.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v19.2.dll

Declaration

[TypeConverter("DevExpress.Xpo.Design.SessionReferenceConverter, DevExpress.Xpo.v19.2.Design, Version=19.2.99.0, Culture=neutral, PublicKeyToken=c38a27d2243c2672")]
public Session Session { get; set; }

Property Value

Type Description
Session

The session with a connection to a data source. The default value is Session.DefaultSession.

Remarks

Do not change this property value manually in your code, as it is intended to provide design-time support for the component. If you need to create the XPColleciton in the designer but specify the Session in code, use the XPBaseCollection.ResolveSession event. In the XPBaseCollection descendants (XPCollection and XPCollection<T>), you can also pass the Session object to the constructor.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Session property.

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