简体   繁体   中英

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. 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#.

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. 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".

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. Search SQlite and install it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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