Practical Reason why choose an ORM over raw ADO.NET

any effort in trying to shave off some microseconds using ADO directly is a waste of time.

My understanding of using ORMs is not whether "raw ADO" is faster in code. The issue is whether writing your own efficient SQL statements is faster than the potentially awful SQL that a badly used ORM can pump out.

Personally I like knowing SQL and not relying on an ORM to do my work for me - in certain performance-critical cases. When using an ORM in any case, I want to say least see the SQL it's producing, so I know it's doing a good job. Because that's my job.

SQL is still code. When I'm using a library to produce code for me, it's still my responsibility to ensure the result is high quality. It's my responsibility to know SQL, not just rely on an ORM to know it for me and hope for the next.

Always be suspicious of ORM output and know SQL you can verify the result. Don't let ORMs make you a lazy coder!

/r/csharp Thread Parent Link - repodb.net