在 VS 2015 & 上从模型生成 SQLite 数据库EF7 [英] Generating SQLite Database from Model at VS 2015 & EF7

查看:21
本文介绍了在 VS 2015 & 上从模型生成 SQLite 数据库EF7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 Entity Framework 7 & 制作 Windows Presentation Foundation 应用程序SQLite 数据库文件.我已经制作了 *.edmx 模型,但是在尝试生成模型时,我无法进行 SQLite 连接.尝试了 - 但它是几个月前.有什么改变吗?有什么办法可以将VS2015上的EF7连接到SQLite吗?

解决方案

您需要从 SQLite.org 下载安装包.我唯一使用它的是

您可能还想获得 Visual Studio 的SQL Server Compact/SQLite 工具箱"扩展(工具/扩展和更新..).有了它,您可以从 MS Sql(测试版)中导出表等.它确实适用于大多数表,但对于其中包含多个主键(复合键)的表有困难.

I'm trying to make Windows Presentation Foundation application, utilizing Entity Framework 7 & SQLite Database File. I've made *.edmx model, but when trying to generate model i can't make 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.

There was already similar question - VS 2015 SQLite data provider - but it was few months ago. Have anything changed? Is there any way to connect EF7 on VS2015 to SQLite?

解决方案

You need to download a setup package from the 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).



You might also want to get the "SQL Server Compact/SQLite Toolbox" extension for Visual Studio (Tools/Extensions and Updates..). With it you can export tables from MS Sql (beta) among other things. It does work for most tables, had difficulties for tables with multiple primary keys in them (composite keys) though.

这篇关于在 VS 2015 & 上从模型生成 SQLite 数据库EF7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆