Answered by:
Is EF STILL slower than ADO.NET and DAPPER ?

Question
-
User192755008 posted
Hello. Anyone done any benchmarking recently, is EF Core STILL slower than ADO.NET and DAPPER like the analysis done in this article ? Dapper vs Entity Framework vs ADO.NET Performance Benchmarking (exceptionnotfound.net)
Monday, March 1, 2021 7:20 AM
Answers
-
User-821857111 posted
The code for the performance test is included in the article. So you can always use it to run your own tests to answer your question.
One thing I would say is that the ADO.NET test uses a DataTable. That is a lot slower than ADO.NET using a DataReader (which is basically what Dapper does). Even then, you could probably speed up the ADO.NET test by specifying the DataTable columns and datatypes explicitly rather than leaving it to ADO.NET to figure out.
But the answer to your question is Yes, Dapper is quicker than EF Core for reading data. And it probably always will be, because it is not a full blown ORM like EF Core. It is a simple object mapper and designed specifically to be quicker than EF Core for reading data.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, March 1, 2021 8:20 AM -
User1120430333 posted
Myself as far as speed needed in some situations, I would just go with ADO.NET, SQL Command Objects, T-SQL and custom objects. I don't see the need to introduce Dapper into the mix and using EF.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, March 1, 2021 5:13 PM -
User-821857111 posted
I don't see the need to introduce Dapper into the mixSaves having to write a mapping layer yourself. That's all.- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, March 1, 2021 7:22 PM
All replies
-
User-821857111 posted
The code for the performance test is included in the article. So you can always use it to run your own tests to answer your question.
One thing I would say is that the ADO.NET test uses a DataTable. That is a lot slower than ADO.NET using a DataReader (which is basically what Dapper does). Even then, you could probably speed up the ADO.NET test by specifying the DataTable columns and datatypes explicitly rather than leaving it to ADO.NET to figure out.
But the answer to your question is Yes, Dapper is quicker than EF Core for reading data. And it probably always will be, because it is not a full blown ORM like EF Core. It is a simple object mapper and designed specifically to be quicker than EF Core for reading data.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, March 1, 2021 8:20 AM -
User1120430333 posted
Myself as far as speed needed in some situations, I would just go with ADO.NET, SQL Command Objects, T-SQL and custom objects. I don't see the need to introduce Dapper into the mix and using EF.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, March 1, 2021 5:13 PM -
User-821857111 posted
I don't see the need to introduce Dapper into the mixSaves having to write a mapping layer yourself. That's all.- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, March 1, 2021 7:22 PM