Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generating SQLite Database from Model at VS 2015 & EF7

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?

like image 549
Andrzej Avatar asked May 19 '15 15:05

Andrzej


1 Answers

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

like image 191
A.J.Bauer Avatar answered Sep 27 '22 17:09

A.J.Bauer