c# - SQLite 1.0.94 未出现在 EDM 提供程序上

标签 c# entity-framework sqlite visual-studio-2013

我注意到这也是 1.0.93 的问题,但它似乎也适用于 1.0.94。

更具体地说:

  1. 机器运行 Windows 8.1 x64,Visual Studio 2013
  2. 从 SQLite 官方网站安装 sqlite-netFx451-setup-bundle-x86-2013-1.0.94.0
  3. 创建 C# .NET 4.5.1 控制台项目
  4. 添加 NuGet SQLite x86/x64
  5. 将“ADO.NET 实体数据模型”添加到我的项目
  6. 从数据库中选择 EF Designer
  7. SQLite 未列在数据源提供程序下。

相反,如果我在服务器资源管理器下添加连接,则会出现 SQLite 提供程序。但是,这还不够,因为我需要使用 Entity Framework 6.1.1。

如果有人对此有解决方案,请分享。谢谢。

最佳答案

确保您的 system.data 部分如下所示:

<system.data>
 <DbProviderFactories>
    <remove invariant="System.Data.SQLite" />
    <remove invariant="System.Data.SQLite.EF6" />
    <add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
 </DbProviderFactories>
</system.data>

关于c# - SQLite 1.0.94 未出现在 EDM 提供程序上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25870045/

相关文章:

c# - 在 DropDownFor 值更改时更改 EditorFor 的值

c# - MVC WebGrid 是开源的吗?

c# - 将实体映射到 DTO,无需重复代码

sql - SQLite:添加包含行位置的列

android - 当使用真实设备而不是模拟器时,DDMS 文件夹中的数据库不可见

java - 我想显示数据库 JAVA Jframe 中的用户名

C# MySql where 子句中的未知列

c# - 具有用于查询的逻辑的 Entity Framework 4.1 属性

sql-server - Entity Framework 4 Code First 与树

c# - 创建 FileStream.Open c# 的接口(interface)