Could you compare Entity Framework vs LINQ to SQL vs ADO.NET with stored procedures?

Technology CommunityCategory: LINQCould you compare Entity Framework vs LINQ to SQL vs ADO.NET with stored procedures?
VietMX Staff asked 11 months ago

Stored procedures:

(++)

  • Great flexibility
  • Full control over SQL
  • The highest performance available

(–)

  • Requires knowledge of SQL
  • Stored procedures are out of source control (harder to test)
  • Substantial amount of “repeating yourself” while specifying the same table and field names. The high chance of breaking the application after renaming a DB entity and missing some references to it somewhere.
  • Slow development

ORM (EF, L2SQL, ADO.NET):

(++)

  • Rapid development
  • Data access code now under source control
  • You’re isolated from changes in DB. If that happens you only need to update your model/mappings in one place.

(–)

  • Performance may be worse
  • No or little control over SQL the ORM produces (could be inefficient or worse buggy). Might need to intervene and replace it with custom stored procedures. That will render your code messy (some LINQ in code, some SQL in code and/or in the DB out of source control).
  • As any abstraction can produce “high-level” developers having no idea how it works under the hood