XpoDefault.GetConnectionProvider(AutoCreateOption) Method
Creates a data store provider (an IDataStore instance).
Namespace: DevExpress.Xpo
Assembly: DevExpress.Xpo.v25.1.dll
NuGet Package: DevExpress.Xpo
Declaration
Parameters
| Name | Type | Description |
|---|---|---|
| defaultAutoCreateOption | AutoCreateOption | Specifies whether XPO can create a database or update its schema. |
Returns
| Type | Description |
|---|---|
| IDataStore | A data store provider. |
Remarks
Uses the ActiveConnectionString property to retrieve the database connection settings.
Example
This example shows how to use the ActiveConnectionString property to create a SimpleDataLayer instance.
using DevExpress.Xpo;
using DevExpress.Xpo.DB;
//...
SimpleDataLayer dataLayer = new SimpleDataLayer(
XpoDefault.GetConnectionProvider(AutoCreateOption.DatabaseAndSchema));
See Also