Using Nuget Package Manager
I installed System.Data.SQLite (x86/x64)
in VS2017
. That resulted in installing the following packages as well:
System.Data.SQLite
System.Data.SQLite.EF6
System.Data.SQLite.Core
But as shown in image below, the Add New Data Source
dialog box does not show the SQLite Data Provider
:
Add SQLite/SQL Server Compact Toolbox from In Visual Studio 2017 Community. Goto Tools - Extensions and Updates - click Online. Search for Sqlite. You should see Sqlite compact toolbox.
Open Visual Studio, select new project, and, in Visual C#, select “Console Application” and provide the name as SQLiteDemo. Click OK. To connect SQLite with C#, we need drivers. Install all required SQLite resources from the NuGet package, as pictured in Figure 1.
SQLite: Run Query Execute query script in the editor. SQLite: Quick Query Choose a database and execute a query without creating a new document. SQLite: Use Database Bind current sql document to the selected database. SQLite: Open Database Open the selected database in the sqlite explorer.
To install EF Core, you install the package for the EF Core database provider(s) you want to target. This tutorial uses SQLite because it runs on all platforms that . NET Core supports.
The NuGet package is for your project and does not include a provider. For that, you need to install a DDEX provider package. There doesn't seem to be an official SQLite DDEX provider package for Visual Studio 2017, but you can try one of these two unofficial ones:
SQLite / SQL Server Compact Toolbox by ErikEJ
dotConnect ADO.NET Data Provider for SQLite by Devart Software
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With