Entity Framework 6 + SQLite
Estoy tratando de usar EF6 alpha y SQLite 1.0.66.0
Mi archivo .config:
<connectionStrings>
<add connectionString="data source=:memory:;" name="TestDbContext" providerName="System.Data.SQLite" />
</connectionStrings>
<entityFramework>
<providers>
<provider invariantName="System.Data.SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite, Version=1.0.66.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139" />
</providers>
</entityFramework>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<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, Version=1.0.66.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139" />
</DbProviderFactories>
</system.data>
Cuando corro
using (var dbContext = new TestDbContext())
{
if (dbContext.Database.Exists())
{
dbContext.Database.Delete();
}
dbContext.Database.Create();
}
Me sale un error:
System.InvalidOperationException: System.InvalidOperationException: El miembro 'Instancia' del tipo de proveedor Entity Framework 'System.Data.SQLite.SQLiteFactory, System.Data.SQLite, Version = 1.0.66.0, Culture = neutral, PublicKeyToken = db937bc2d44ff139 did not devuelve un objeto que hereda de 'System.Data.Entity.Core.Common.DbProviderServices'. Los proveedores de Entity Framework deben extenderse desde esta clase y el miembro 'Instancia' debe devolver la instancia Singleton del proveedor.
¿Qué estoy haciendo mal?