简体   繁体   English

是否可以从Microsoft Visual Studio中的sqlite3文件创建dbml?

[英]Is it possible to create dbml from an sqlite3 file in Microsoft Visual Studio?

I have connected a .sqlite3 database to my project with a lot of data on it. 我已经将.sqlite3数据库连接到我的项目,其中包含大量数据。 I was wondering if there was anyway I could just use the tables as objects instead of having to query it every time. 我想知道是否仍然可以将表用作对象,而不必每次都查询它。 I'm using C#. 我正在使用C#。

I figured it out: 我想到了:

You have to open the "Data Sources" window which is located under the "View" menu, in the "Other Windows" sub-menu. 您必须在“其他Windows”子菜单的“视图”菜单下打开“数据源”窗口。 Then choose "Add New Data Source". 然后选择“添加新数据源”。 Choose Database and click through it. 选择数据库,然后单击它。 Once the option comes, choose "New Connection" and then "Change" the "Data Source" option to "System.Data.Sqlite Database File". 选项出现后,选择“新建连接”,然后将“数据源”选项“更改”为“ System.Data.Sqlite数据库文件”。

If the option for Sqlite database file is not there, you may need to install the NuGet package for SQLite, which is done by right clicking on reference in the solution explorer, then Manage NuGet Packages. 如果不存在Sqlite数据库文件选项,则可能需要安装用于SQLite的NuGet软件包,方法是右键单击解决方案资源管理器中的引用,然后单击“管理NuGet软件包”。 Search SQlite and install it. 搜索并安装SQlite。

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

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