I'm thrilled to utilize SQLite for testing with Entity Framework Code First after having experience with NHibernate and SQLite.
It would be nice and save some time from my busy day if you have some sample connections string and setup examples.
It's important to note that I get the following problem while using the EF "data context" to perform crud operations when debugging:
'System.Data.SQLite.SQLiteConnection' connection's provider name cannot be determined.
<system.data> <DbProviderFactories> <remove invariant="System.Data.SQLite"/> <add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" /> </DbProviderFactories> </system.data> <connectionStrings> <add name="DataContext" connectionString="Data Source=:memory:;Version=3;New=True;" providerName="System.Data.SQLite" /> </connectionStrings>
Hopefully, EF and SQLite do combine in this way. Despite the error message's scary suggestion that it's unlikely.
Any ADO.NET 3.5 level service should have no trouble integrating with Code First (these implement Entity Framework functionality).
Additionally, the 4.0 competent providers include functionality for DeleteDatabase, CreateDatabase, and DatabaseExists.
Beyond this, Code First does not need any more provider capability.
In order to generate everything else it requires, it first looks at the type of the Connection and then attempts to map it back to the provider and its provider factory.
It would be prudent to confirm that your GAC is home to an updated SQLLite supplier that supports the 3.5 level capability.
The assembly qualified name must be used:
<add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite, Version=126.96.36.199, Culture=neutral, PublicKeyToken=db937bc2d44ff139" />