by mythz · 14y ago · 0 comments
The benefit of Micro ORMs is that they bind to clean re-usable POCO's (which by nature can be re-used as DTO's, ViewModels, etc).
Most of them also add features as DRY extension methods over the underlying ADO.NET System.Data.* interfaces, so there's no magic behaviour or heavy abstractions happening underneath, letting you add new features orthogonally (by adding your own DRY Extension methods in your own project), and you always have direct access to ADO.NET IDbConnection so you're never restricted when you need it.
http://blogs.msdn.com/b/adonet/archive/2012/02/14/sneak-prev...
(Disclosure: I work at Microsoft)
But I guess it doesn't matter when you're still be the most popular .NET package http://nuget.org/packages (580k) whilst remaining more than a factor of times slower than the competition - that's the .NET OSS ecosystem for you.
PS: A lot of frameworks are actually setup to handle the least important case first, handling large result sets are generally more important than the overhead for tiny query's. It's nice to be able to for things to work so a query that returns 1/2 million rows still returns in 1/100th a second and you can start paging through that result set even if the behavior adds overhead in the simple case. Chances are there is a shortcut if you only want 1 result just look for .first or a similar shortcut.
Like most heavy ORMs it's not obvious what SQL a complex LINQ statement emits where it's common to fall into "pits of failure" where it converts to multiple sub selects or the worst case N+1 queries. I'm personally not a fan of Heavy ORM's their an abstraction over a simple DSL and EF remains unnecessarily bloated and complex.
BTW we do measure + profile, and EF is amongst the worst performing ORMs out there. Please provide benchmarks to the contrary?
Have you tried a Micro ORM?