Latest Dapper VS Entity Framework 6 performance considerations

  1. Does anyone have any updates on performance regarding EF 6.1.x? This concerns general queries made within a DbContext?

Ans: I don’t have specific numbers, but I have updated the performance rig to EF6; I can’t remember the outcome exactly, but: EF6 is a lot faster than EF-old, but dapper is still significantly faster in many scenarios (and about the same for the edge-cases)

  1. I suppose I cannot use nicely formatted LINQ queries with Dapper. Do you have experience with that? Is it worth losing LINQ for the additional speed?

Ans: That is subjective; for us: yes, absolutely worth it – but we care lots about speed. Parsing expression trees has impact, and generated SQL is very rarely in the same league as handcrafted SQL by a decent dev

  1. IS Dapper still under active, constant development? GitHub tells me yes, but as with Subsonic, that can change rather quickly?

Ans: Absolutely; I think I’ve deployed about 4 versions this month…

  1. Is it feasable/doable to mix Dapper and EF? Dapper when we need the speed, otherwise EF?

Ans: Yes, you can do that; that is how we started with dapper – we used that to replace LINQ to SQL code that was causing performance problems; over time, that had grown, and now we have very little LINQ to SQL code remaining (but still some)

Leave a Comment