ADO.NET vs EntityFramework

Can anyone explain the difference between ADO.NET and Entity Framework in layman terms?
I have searched on google but cannot figure out the difference.

ADO.Net means use sqlConnection();

, sqlCommand();

etc. to interact with the database using queries?
Entity Framework means using db.Add();

, db.SaveChanges();

functions to interact with the database without using queries? I'm right?

+3


source to share


1 answer


When you use EF db.Add();

or db.SaveChanges

or any other EF integrated method, the ORM (Object Relational Mapper) in this EF example will use ADO.NET (so EF will open a database connection with ADO. NET, EF will create a "SQL query" with using ADO.NET, ...).

Of course, you can do this yourself using ADO.NET techniques that can sometimes increase query performance, but usually more coding is required.



But in general, when you use EF, you also use ADO.NET, only implemented it inside EF methods.

+4


source







All Articles