Session.Connect(IDataLayer, IDisposable[]) Method
In This Article
Connects the session to a data store using a specified data access layer.
Namespace: DevExpress.Xpo
Assembly: DevExpress.Xpo.v24.2.dll
NuGet Package: DevExpress.Xpo
#Declaration
public void Connect(
IDataLayer layer,
params IDisposable[] disposeOnDisconnect
)
#Parameters
Name | Type | Description |
---|---|---|
layer | IData |
An object implementing the IData |
dispose |
IDisposable[] | An array of objects to be automatically disposed of when the session is disconnected from a data store. |
#Remarks
This method does the following.
- Creates an object access layer (via the static SimpleObjectLayer.FromDataLayer method) based on the layer.
- Calls the other Connect overloaded method and passes the created object access layer as its parameter.
See Also