Different approaches of Entity Framework

Thusitha Wijerathne
Sep 7, 2018 · 1 min read

ORM will reduce the impedance of the Database(Relational) and Object classes. When we are using an ORM, our flexibility will be limited by the tool we use.

Ex: Lets go to the usage of Linq-to-SQL there are a some limitations.

  • Works only with pre-existing databases.
  • No support for building the object model.

Considering those limitations, Entity Framework became as a better ORM in the developments.

Entity Framework supports in three design approaches,

  • Model First:

Model First approach when designing the database and the object model at the same time with Entity Designer in Microsoft Visual Studio.

  • Code First:

Code First generator builds the database from those classes( development team writes the plain old CLR object (POCO) classes).

  • Database First:

Database First approach, which enables you to continue using the existing structure with no impact on the database.

simple object created in the Common Language Runtime (CLR) of the .NET Framework which is unencumbered by inheritance or attributes. we can change name of the table or column in the database, maximum length, default values, keys, database-generated IDs, and other characteristics.

REFERENCES:

https://docs.microsoft.com/en-us/ef/ef6/index

Thusitha Wijerathne

Software Engineer at Tiqri Corporation

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade