ImP*_*ImP 10 c# database sqlite entity-framework
我做了什么来得到我的位置:我使用GAC和VS2012选项从http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki安装了程序集.
我现在可以建立与现有SQLite数据库的连接,或者建立连接并创建新的SQLite数据库文件.
此连接将出现在我的服务器资源管理器中,并且工作正常.我可以从资源管理器中查看此数据库并更改表等.
但是,当我尝试添加新的ADO.NET实体数据模型时,这个已建立的连接将不会出现在可用的数据连接中.即使我继续进行新连接,System.Data.SQLite数据库文件选项甚至不在选项列表中.
我尝试单独使用NuGet或与SQLite包一起安装实体包.我已经尝试过不安装它们或仅将Entity模型与前面提到的程序集一起安装,但SQLite的选项不会出现.
经过谷歌搜索和溢出这个令人沮丧的时间,并发现只有一小部分人显示出与我相同的问题,但没有解决方案对我有用,我来找你帮忙.
经过我所有的努力,我怀疑它归结为我的App.config文件.我看起来如下:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
<provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
</providers>
</entityFramework>
<system.data>
<DbProviderFactories>
<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>
</configuration>
Run Code Online (Sandbox Code Playgroud)
类似的问题:
数据库首先使用system.data.sqlite 1.0.93创建实体框架6.1.1模型
http://sqlite.1065341.n5.nabble.com/Provider-not-showing-up-in-Net-Model-import-wizard-td75306.html
我使用了vs2012 .NET 4.5,SQLite版本1.0.96.0,实体6.1.3
我希望有人能够帮助我.
| 归档时间: |
|
| 查看次数: |
10406 次 |
| 最近记录: |