Maryam
Maryam

Reputation: 913

Database First with EF7 in a Universal App

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?

Upvotes: 2

Views: 910

Answers (2)

je30ca
je30ca

Reputation: 96

You can install SQL Server Compact/SQLite Toolbox and create model from database SQL Server Compact/SQLite Toolbox DLL

Upvotes: 3

Indregaard
Indregaard

Reputation: 1195

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:

  1. Get nuget packages EntityFramework.Commands and EntityFramework.MicrosoftSqlServer.Design
  2. Run from the package manager console: Scaffold-DbContext '<connectionString>' EntityFramework.MicrosoftSqlServer or *dnx ef dbcontext scaffold '<connectionString>' EntityFramework.MicrosoftSqlServer

Upvotes: 0

Related Questions