SQLite with EF Code First

為{幸葍}努か 提交于 2019-11-30 08:59:16

Code First should work just fine with any ADO.NET 3.5 level provider (these implement Entity Framework functionality).

The 4.0 capable providers also add DeleteDatabase/CreateDatabase/DatabaseExists functionality.

Code First requires no additional provider functionality beyond these.

What happens is that it looks at the type of the Connection and then tries to map that back to the provider and its provider factory so it can create everything else it needs.

It would be worth checking to make sure you have an up-to-date SQLLite provider installed in your GAC that supports the 3.5 level functionality.

You need to use the assembly qualified name:

<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" />
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!