I have a Sqlite database that I want to use in my UWP application With EF7, How can I create model from database with EF7?
Asked
Active
Viewed 900 times
2

Indregaard
- 1,195
- 1
- 18
- 26

Maryam
- 883
- 10
- 24
-
Possible duplicate: http://stackoverflow.com/questions/29300777/is-there-an-entity-framework-7-database-first-poco-generator – Rowland Shaw Mar 07 '16 at 14:36
2 Answers
3
You can install SQL Server Compact/SQLite Toolbox and create model from database SQL Server Compact/SQLite Toolbox DLL

je30ca
- 96
- 10
0
According to this question/answer you should be able to create poco classes from an existing database. However, I have not tried this myself.
To summarize ErikEJs answer:
- Get nuget packages EntityFramework.Commands and EntityFramework.MicrosoftSqlServer.Design
- Run from the package manager console: Scaffold-DbContext '<connectionString>' EntityFramework.MicrosoftSqlServer or *dnx ef dbcontext scaffold '<connectionString>' EntityFramework.MicrosoftSqlServer

Community
- 1
- 1

Indregaard
- 1,195
- 1
- 18
- 26
-
-
Ok my bad. I have never used Sqllite ut could there be equivalent packages available? Have you tried fetching EntityFramework.Sqlite.Design and running the command with "xxxxxxxxxx EntityFramework.Sqllite" instead? – Indregaard Mar 08 '16 at 10:43
-
-