Ado.net and entity framework which one is better for a mid size level application..??
Loading
Ado.net and entity framework which one is better for a mid size level application..??
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Sachin SinghRank #66 · 26.2K reputationPosted Aug 11, 2022, 4:36 AM EDT
Rajanikant HawaldarRank #110 · 20.2K reputationPosted Aug 11, 2022, 5:03 AM EDT
Vishal YelveRank #178 · 13.6K reputationPosted Aug 11, 2022, 6:09 AM EDT
Entity Framework consists of wrapper classes for ADO dot NET and so you can do the database coding much more faster with it.
While using EF you gain the following things:
Entity Framework example to read the records:
using (var context = new CompanyContext()) { var emp = context.Employee; }ADO dot NET example to read the records:
SqlCommand command = new SqlCommand("SELECT * FROM Employee;", connection); connection.Open(); SqlDataReader reader = command.ExecuteReader(); if (reader.HasRows) { while (reader.Read()) { // do some coding } else { // do some coding } reader.Close(); }Sam HobbsRank #107 · 20.5K reputationPosted Aug 12, 2022, 12:45 AM EDT
Vishal Yelve is correct that Entity Framework can use ADO.Net. Entity Framework can also work with other objects (databases and other things). Entity Framework does more than what ADO.Net does. Entity Framework can make things easier but it takes more time to learn. Time invested in learning Entity Framework is well spent.
The real benefits of EF are that it can automatically create classes for database items. In EF, database items are called entities. EF can do most all the common work of working with databases; you just need to write the code specific to your requirements.
Nitin SontakkeRank #264 · 9.6K reputationPosted Aug 12, 2022, 5:23 AM EDT