在给定 SQLite 数据库的情况下,生成 Entity Framework 模型代码的最快方法是什么?

What's the quickest way to generate Entity Framework model code given an SQLite database?

我有一个由 SQL DDL(CREATE TABLE 等)脚本定义的 SQLite 数据库,我要派生 Entity Framework 模型 类 使用它。

过去,当我有机会尝试 Visual Studio 2013 Ultimate 和 Microsoft SQL Server 在相同情况下,Visual Studio 允许我使用 "database-first"方法和逆向工程模型以自动创建模型 类。但是我在 Visual Studio 2015 社区和 SQLite.

中找不到类似的东西

我是不是遗漏了什么或者可能有第 3 方工具可以让我免于机械地手动输入所有模型代码?

如果您使用 VS Express,那您就倒霉了,因为您无法使用该版本安装 DDEX 提供程序或任何其他扩展。使用社区,从 http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki (see my blogpost here for detailed info: http://erikej.blogspot.dk/2014/11/using-sqlite-with-entity-framework-6.html )

下载 sqlite-netFx46-setup-bundle-x86-2015-1.0.104.0.exe

如果您使用 EF Core,请升级到社区,并安装我的 VS 扩展 SQLite 工具箱的最新版本,它具有通过 GUI 生成 EF Core 模型的功能 https://github.com/ErikEJ/SqlCeToolbox/wiki/Release-notes