Entity Framework DEV Approaches - Microsoft Entity Framework

What Entity Framework DEV Approaches?

In this section, let us concentration on building models with the Designer or Database First or just using Code First. Following are some rules which will help you choose which modeling workflow to select.

  • We have already seen instances of Code First modeling, Database First modeling and a Model First modeling workflow.
  • The Database First and Model First workflows used the Fashionable but one starts with the database to create a model and the other starts at the model to create a database.


  • For those designers who do not want to use Graphical Designer plus code group, Entity Framework has a completely different workflow called Code First.
  • The typical workflow for Code First is great for make new applications where you don't even have a database. You explain your classes and code and then let Code First figure out what your database should look like.
  • It is also likely to start Code First with a database and that creates Code First a bit of a contradiction. But there's a tool to let you reverse engineer a database into classes which is a great way to get a head start on the coding.

Given these decisions, let's look at the Decision Tree.

  • If you select to work with a Graphical Designer in generated code, then you'll want to choose one of the workflows that contain EF Designer. If your database already exists, then Database First is your path.
  • If you want to use a Graphical Designer on a brand new assignment without a database, then you'll want to use Model First.
  • If you just want to work with code and not a Designer, then Code First is possibly for you along with the option of using the tool that reverse engineers the database into classes.
  • If you have existing classes, then your best bet is to use them with Code First.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Microsoft Entity Framework Topics