Back to Devexpress

AutoCreateOption Enum

corelibraries-devexpress-dot-xpo-dot-db-b1143ea3.md

latest5.0 KB
Original Source

AutoCreateOption Enum

Lists the values that specify the action which is performed when a session is connected to a data store.

Namespace : DevExpress.Xpo.DB

Assembly : DevExpress.Data.v25.2.dll

NuGet Package : DevExpress.Data

Declaration

csharp
public enum AutoCreateOption
vb
Public Enum AutoCreateOption

Members

NameDescription
DatabaseAndSchema

A session will try to automatically create the database if it doesn’t exist. It will also create or update the database schema for any persistent classes currently being used.

| | SchemaOnly |

A session will automatically create or update the database schema for the persistent classes currently being used. If the database doesn’t exist, it won’t be created by a session.

| | None |

A session will not automatically create the database or update the database schema. The database schema is still queried and checked to match the currently used persistent class metadata.

| | SchemaAlreadyExists |

A session will never query the database for schema to validate against persistent class metadata. This will suppress the SchemaCorrectionNeededException , but a database error may occur during data operations if the schema is not compatible with run-time persistent classes metadata.

|

The following properties accept/return AutoCreateOption values:

Show 13 items

LibraryRelated API Members
Cross-Platform Class LibraryDataCacheBase.AutoCreateOption
DataCacheNode.AutoCreateOption
DataCacheRoot.AutoCreateOption
DataStoreBase.AutoCreateOption
IDataStore.AutoCreateOption
XPO (.NET ORM Library)AccessConnectionProviderMultiUserThreadSafe.AutoCreateOption
DataLayerOptions.AutoCreateOption
IDataLayer.AutoCreateOption
IObjectLayerEx.AutoCreateOption
MSSql2005SqlDependencyCacheRoot.AutoCreateOption
SerializableObjectLayerClient.AutoCreateOption
Session.AutoCreateOption
SimpleObjectLayer.AutoCreateOption

The following properties accept/return AutoCreateOption values:

Show 12 items

LibraryRelated API Members
Cross-Platform Class LibraryDataCacheBase.AutoCreateOption
DataCacheNode.AutoCreateOption
DataCacheRoot.AutoCreateOption
DataStoreBase.AutoCreateOption
IDataStore.AutoCreateOption
XPO (.NET ORM Library)AccessConnectionProviderMultiUserThreadSafe.AutoCreateOption
IDataLayer.AutoCreateOption
IObjectLayerEx.AutoCreateOption
MSSql2005SqlDependencyCacheRoot.AutoCreateOption
SerializableObjectLayerClient.AutoCreateOption
Session.AutoCreateOption
SimpleObjectLayer.AutoCreateOption

Remarks

The values listed by this enumeration can be used when instantiating a data access layer. Additionally, you can set the mode for a specific Session, using the Session.AutoCreateOption property.

See Also

DevExpress.Xpo.DB Namespace