How to set up entity framework 6 for sqlite in visual studio 2013

How to setup entity framework 6.x for Sqlite in Visual Studio 2013. I want to setup win-form application for SqLite with Entity Framework 6.x. I require the process described below.

I tried some solutions, but none is directly related to the specific requirements of the system. There are some questions like this, but in all they ask to solve their problem. I want to say that I want to do it neatly step by step so that people can get a straight path 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 add Ado.Net Entity Data Model, there is no provider for Sqlite db connection.

enter image description here

+3


source to share


2 answers


Close VS.

Go to this page: http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki

Find it on the page: Setups for 32-bit Windows (.NET Framework 4.5.1)

and download the bundle for VS 2013 (the one that is the only one that installs the bundles for VS 2013 in bold).



Make sure to store the DLLs in the GAC and install the design-time components (this takes a while).

Start VS.

You should now be able to add connections to the SQLite database file.

+6


source


For Visual Studio 2013, you need to download and install sqlite-netFx451-setup-bundle-x86-2013-1.0.97.0.exe . In the installation, do not forget to check the boxes: Install assemblies in the global assembly cache (GAC) and install designer components for Visual Studio 2013.

It is important that the version of the SQLite Provider matches the version of the current SQLite EF6 NuGet package you are using in your project. You can check which version of the SQLite provider you have installed in Add / Remove Programs , and also make sure that no older versions of the SQLite provider exist.

Once installed, you can add a connection to your SQLite database from Server Explorer:



enter image description here

You can get more information in this blog and this post where you can also find a video with the steps you need to follow.

+3


source







All Articles