mardi 26 mai 2015

Using .Net Entity Data Model with SQLite

I'm attempting to convert a c# application currently running on SQL Server 2014 LocalDB over to SQLite, which appears to do the same job but is much lighter. I spent the whole day reading about it and installing various components.

The problem is that I can't find a way to either migrate my Entity Framework 6 database schema. Nor can I successfully create a new database schema from the SQLite database. Does the Visual Studio 2013 data model designer work with SQLite? How can I get my entity objects created and working properly?

I installed the SQLite package from (the one that provides design-time support for Visual Studio 2013) http://ift.tt/1pLXZDc

I installed System.Data.SQLite (x86/x64) into my project from NuGet http://ift.tt/1Bglg87

I followed these instructions http://ift.tt/1GC1Fm0

If I go in Server Explorer, I'm able to add the SQLite connection. When I add a new item to the project "ADO.NET Entity Data Model", and then select "EF Designer from database", and then "New Connection", the only options it offers are SQL Server and SQL Server Database File. If the SQLite connection is in App.Config, it appears in the list and I can use it, but it doesn't work properly.

So... what do I do from here?

Aucun commentaire:

Enregistrer un commentaire