Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,148,856 members, 7,802,745 topics. Date: Friday, 19 April 2024 at 08:36 PM

Entity Framework Vs Ado.net With TVP Updating Multiple Rows - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Entity Framework Vs Ado.net With TVP Updating Multiple Rows (872 Views)

Download Employee's Information System Using VB.NET With Free Source Code / Implementing CRUD Operation With Entity Framework In Asp.net MVC Series / Building Dynamic Html Template Newsletter Application In Asp.net With Hangfire (2) (3) (4)

(1) (Reply)

Entity Framework Vs Ado.net With TVP Updating Multiple Rows by remotecoder: 12:27pm On Dec 28, 2017
For C# and all .Net programmers which one do you use, Entity Framework or ADO.Net and why?

Check this post to know when to use which: https://stackoverflow.com/questions/44059432/entity-framework-vs-ado-net-with-tvp-updating-multiple-rows

Re: Entity Framework Vs Ado.net With TVP Updating Multiple Rows by raymod170(m): 1:41pm On Dec 28, 2017
None of them are better than each other. They have their pros and cons.
Using EF is relatively easy. It's just about the creating classes and mapping them to SQL tables and use built in classes to query and store data in the database.
Connection Opening, Closing etc all are taken care by EF.
Database operations are very simple. As simple as adding object to collection and calling Save method.
Easy to manage the changes when database changes.
But EF comes with bit of a perfomance cost and offers very little customization.
When you select entity using EF all the columns selected from the table which some time is not necessary.
In ADO.NET you can have flexibility of creating your own SQL query and running it using SQL Command. You can store the query output in whichever data structure you like such as datatable, dataview, entities etc.
With efficiently written queries you can have performance advantage also.
ADO.NET makes you write lot of code for the basic operations such as connection open and close, connection pooling, creating command and parameters etc.
Changes in the database can cause a very big issue such a change in table structure,table added or removed from db etc.
While ADO.NET is a proven technology for database operations from application, EF is widely accepted and providing in-built support by various latest MS app development frameworks such as ASP.NET MVC and MS Web API.
I personally prefer ADO. NET as i don't mind writing the codes to perform the desired operations

best regards
Re: Entity Framework Vs Ado.net With TVP Updating Multiple Rows by remotecoder: 2:01pm On Dec 28, 2017
@raymod
David Browne - Microsoft Technology Architect - Microsoft Technology Center Dallas, also recommends You "drop down" to ADO.NET or TSQL for bulk operations and complicated queries.

For me I prefer ADO.Net for speed when dealing with bulk data, also as EF needs ADO.Net for calling stored procedure, working with TVP, if you want to count the number of sql table fields and for complex querie.

(1) (Reply)

Where Can I Learn Autodesk Revit For Electrical Design? / A Programming Partnership Offer. / Please, Advice Needed On How To Re Enter The Software Development Industry.

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 11
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.