Back to Devexpress

IDataStore.AutoCreateOption Property

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

latest2.3 KB
Original Source

IDataStore.AutoCreateOption Property

When implemented by a class, returns which operations are performed when a data store is accessed for the first time.

Namespace : DevExpress.Xpo.DB

Assembly : DevExpress.Data.v25.2.dll

NuGet Package : DevExpress.Data

Declaration

csharp
AutoCreateOption AutoCreateOption { get; }
vb
ReadOnly Property AutoCreateOption As AutoCreateOption

Property Value

TypeDescription
AutoCreateOption

An AutoCreateOption value that specifies which operations are performed when a data store is accessed for the first time.

|

Available values:

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.

|

Remarks

In most cases, this property is initialized in the constructor of the class that implements the IDataStore interface.

See Also

IDataStore Interface

IDataStore Members

DevExpress.Xpo.DB Namespace