Why Entity Framework ?

Karim Samir
SimplifyInterview
Published in
May 21, 2024

EF provides an automated process to access (select) and maniplation (delete , insert, update) without writing too much code lines in Data Access Layer.

In ADO.NET we had to write TSQL codes for everything we must do with DB { insert into table () values () } or {update table set field1=value1 ,…where ID=? } or {delete from table where ID=?}
Assume you have many feilds and you have to write code manually for each inserting deleting and updating so it takes so much time.

The benefit of using EF queries is that we can write the same code, but have different translations. For example, we can write the same C# code for the SQL server and for the PostgreSQL.

--

--