Reputation: 2795
How can I configure entity framework 6.x for Sqlite in Visual Studio 2013. I want to configure my win-form application for SqLite with Entity Framework 6.x. I need process step by step described.
I tried some solutions, but no one is straight forward for the specific system requirement. There is some questions similar this, but in all they are asking to resolve their problem. My point is that, I want a neat step by step process to do this, so that people can get a straight forward way for this thing.
Currently I have installed data provided for .net framework 4.5.1 from here and entity framework 6.0.2 for Sqlite from nuget. But when I am adding Ado.Net Entity Data Model, there is no provider listed for Sqlite db connection.
Upvotes: 3
Views: 2270
Reputation: 39376
For Visual Studio 2013, you need to download and install the sqlite-netFx451-setup-bundle-x86-2013-1.0.97.0.exe. In the installation, remember to check the checkboxes: Install the assemblies into the Global Assembly Cache (GAC) and Install the designer components for Visual Studio 2013.
It is important that the SQLite Provider version matches the version of the current SQLite EF6 NuGet package that you use in your project.You can check which version of the SQLite Provider you have installed in Add or Remove Programs, and also check that no older versions of the SQLite Provider are present.
Once installed, you can add a connection to your SQLite database from Server Explorer:
You can get more detailed info in this blog and in this post where you can also find a video with the steps you need to follow.
Upvotes: 3
Reputation: 5458
Close VS.
Go to this page: http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki
Search for this on the page:
Setups for 32-bit Windows (.NET Framework 4.5.1)
and download the bundle for VS 2013 (The one that sais it's the only one that installs the packages for VS 2013 in bold letters).
Make sure to save the DLLs to GAC and to install the design time components (this does take some time).
Start VS.
You should be able to add connections to an SQLite database file now.
Upvotes: 6