ADO.NET vs. Entity Framework for SaaS application : Which is faster for data handling?

Asem AS 50 Reputation points
2023-08-03T19:02:09.2233333+00:00

Hello,

I am working on building a SaaS (Software as a Service) application. What is better to use, ADO.NET or Entity Framework, in terms of speed of handling data display, storage, and modification operations?

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,427 questions
{count} votes

Accepted answer
  1. Fabio Caruso 90 Reputation points
    2023-08-03T20:22:29.5066667+00:00

    If You should manipulate some data (searching, adding, updating) like in e-commerce, travel, train or plane booking, shopping carts in general, I think the best choice is Entity Framework, using Optimistic Concurrency in a multi-user environment. If You have to delete 10000 records in one shot, or move a table to another, or apply a change to a whole table or database, or simply display 1000 rows in a table, then probably is ADO.NET with SQL commands that You want to use...


1 additional answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 74,956 Reputation points
    2023-08-03T22:04:10.9566667+00:00

    ado.net is lower level and can be faster especially if you use readers rather than DataTables. but of course its more coding, and you need to know sql.

    if you have a lot dynamic queries or a lot of stored procs, then ado.net might be simpler.

    you can also use EF dynamic sql which should match using ado.net and DataTables performance wise.

    as EF returns query results as strongly typed objects, you will probably have less coding errors.

    a third option is dapper (a micro-orm, which I typically use):

    https://github.com/DapperLib/Dapper

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.