9

I'm trying to make Windows Presentation Foundation application, utilizing Entity Framework 7 & SQLite Database File. I've made *.edmx model, but when trying to generate model i can't make SQLite Connection. Tried everything from https://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki but nothing helped, still no option for creating proper connection.

Generation chooses

There was already similar question - VS 2015 SQLite data provider - but it was few months ago. Have anything changed? Is there any way to connect EF7 on VS2015 to SQLite?

Community
  • 1
  • 1
Andrzej
  • 123
  • 1
  • 6
  • 1
    edmx no longer works in EF7: "Prior to EF7 there are two ways to store models, in the xml-based EDMX file format or in code. Starting with EF7 we will be retiring the EDMX format and having a single code-based format for models." http://blogs.msdn.com/b/adonet/archive/2014/10/21/ef7-what-does-code-first-only-really-mean.aspx – magicandre1981 May 19 '15 at 17:57
  • I work on a large project which utilities both Entity framework (EF4) and SQLite. My experiences of this has not been pleasant! Recently we have taken a shift towards the Micro ORM [Dapper](https://github.com/StackExchange/dapper-dot-net). So far so good! With Dapper we have managed to successfully share the code base across multiple database providers (SQLite and SQL Server) without any hassle. – Helix 88 Jul 14 '15 at 10:39

1 Answers1

1

You need to download a setup package from the SQLite.org. The only one I got it working with was sqlite-netFx46-setup-bundle-x86-2015-1.0.98.0.exe (The 64x version didn't do it).

Change data source

You might also want to get the "SQL Server Compact/SQLite Toolbox" extension for Visual Studio (Tools/Extensions and Updates..). With it you can export tables from MS Sql (beta) among other things. It does work for most tables, had difficulties for tables with multiple primary keys in them (composite keys) though.

enter image description here enter image description here

A.J.Bauer
  • 2,803
  • 1
  • 26
  • 35