Does the DevArt SQLite provider support creation of databases?
I'm using EF code first but each time I try to create a database I'm getting a first chance exception "DatabaseExists is not supported by the provider". This is coming from System.Data.Common.DbProviderServices, and it looks as if the SQLiteProviderServices class does not override the appropriate member to support database creation.
So, I just want clarification that the current SQLite provider does not permit databases to be constructed and I'll have to generate the schema by hand.
Thanks in advance,
Morgan
Creating a new database with EF code first
Re: Creating a new database with EF code first
Please use the SQLiteEntityProviderServices class from the Devart.Data.SQLite.Entity namespace instead of the SQLiteProviderServices class.
Re: Creating a new database with EF code first
The Devart.Data.SQLite.Entity.SQLiteEntityProviderServices class will be used automatically if the context connects to the database via Devart.Data.SQLite isntead of System.Data.SQLite. So make sure that you have set a connection string via Devart.Data.SQLite in the config file with the name which is the same as the name of the context if you are using a default constructor. Or specify the connection object explicitly when creating the context.