简体   繁体   English

在VS 2015和EF7上从模型生成SQLite数据库

[英]Generating SQLite Database from Model at VS 2015 & EF7

I'm trying to make Windows Presentation Foundation application, utilizing Entity Framework 7 & SQLite Database File. 我正在尝试利用Entity Framework 7和SQLite数据库文件制作Windows Presentation Foundation应用程序。 I've made *.edmx model, but when trying to generate model i can't make SQLite Connection. 我已经创建了* .edmx模型,但是当尝试生成模型时,我无法建立SQLite Connection。 Tried everything from https://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki but nothing helped, still no option for creating proper connection. 尝试了https://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki中的所有内容,但没有任何帮助,仍然没有创建正确连接的选项。

世代选择

There was already similar question - VS 2015 SQLite data provider - but it was few months ago. VS 2015 SQLite数据提供程序已经存在类似的问题,但这是在几个月前。 Have anything changed? 有什么改变吗? Is there any way to connect EF7 on VS2015 to SQLite? 有什么方法可以将VS2015上的EF7连接到SQLite?

You need to download a setup package from the SQLite.org. 您需要从SQLite.org下载安装程序包。 The only one I got it working with was sqlite-netFx46-setup-bundle-x86-2015-1.0.98.0.exe (The 64x version didn't do it). 我唯一可以使用的工具是sqlite-netFx46-setup-bundle-x86-2015-1.0.98.0.exe (64x版本没有执行此操作)。

变更资料来源

You might also want to get the "SQL Server Compact/SQLite Toolbox" extension for Visual Studio (Tools/Extensions and Updates..). 您可能还希望获得Visual Studio的“ SQL Server Compact / SQLite工具箱”扩展(工具/扩展和更新..)。 With it you can export tables from MS Sql (beta) among other things. 有了它,您可以从MS Sql(测试版)中导出表。 It does work for most tables, had difficulties for tables with multiple primary keys in them (composite keys) though. 它确实适用于大多数表,但是对于其中具有多个主键(复合键)的表却有困难。

在此处输入图片说明 在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM