Entity FrameWork

In this passage i will explain why we use ado.net and why developers need ORM.

Entity Framework is a tool for Object Relational Mapping.It is like a bridge between OOP and Relational Data Base.Entity Frame Work works as an assistans by getting data and bound your database object.Entity Framework works with Ado.Net.What is the Ado.Net? It contains UnitOfWork design pattern and written by Microsoft.For instance, adding, updating,deleting like this process we should create sentences String type.On the other hand,UnitOfWork doesn't need seperate all String process properly.It can manage these processes just by one source and u don't need to definite more String type.

We can create a project by using 4 different path with EntityFrameWork:

*Model First:

In this pattern, we create an empity modal file on the Visual Studio and add (.edmx) then we may design our database.At the compilation step Script file which is given creates database.

*Database First:

Database First pattern provides automatic class creating by using Entity Framework.In this pattern Database should be created before tie up project as a modal.

*Code First:By Code

In this pattern,All classes are created on the Visual Studio manually.Then Database derives from these classes.At that step Mapping processes can be manage thanks to Attributes.In addition to attributes Fluent Api and Fluent Validation can be used for Mapping process.

*Code First:By Use Database

At this pattern, as wee read before,it is similar.It means,developer created classes and mapping codes.Database updates in terms of class and models situation.

Pros & Cons of Entity Framework

references: medium.com/Recep Mert Aslan, c-sharpcorner.com/Emiliano Musso

Last updated