Database Script Generation Settings
In This Topic
dotConnect for SQLite allows configuring deleting database objects in the DeleteDatabase() method. These customizations are rather useful for the Code First approach. You can tweak the behaviour of method using the SQLiteEntityProviderConfig.DatabaseScript.Schema
and SQLiteEntityProviderConfig.DatabaseScript.ForeignKey classes.
DeleteDatabaseBehaviour. This enumeration determines the behavior of the DeleteDatabase() function.
- ModelObjectsOnly - this is the default value. Only the tables that model objects are mapped to are created/deleted.
- AllSchemaObjects - all tables will be created/deleted from schemas or databases that model objects were mapped to.
SQLiteEntityProviderConfig.DatabaseScript.ForeignKey Settings
- Enabled. Turns on/off generation of foreign constraints. The default value is true.
- IndexCreation. When set to true, an index is created for the columns being parts of the foreign key. The default value is true.