3 ms·
Letting go of ORMs is so easy with good lightweight model binding libraries. e.g. Dapper (https://github.com/StackExchange/Dapper https://github.com/StackExchan
by jdc0589 9y ago
Letting go of ORMs is so easy with good lightweight model binding libraries. e.g. Dapper (https://github.com/StackExchange/Dapper https://github.com/StackExchange/Dapper)
- cryptarch 9y agoHow do model binding libraries compare to ORM's w.r.t. performance, e.g. query optimization?
- Nuzzerino 9y agoORMs are doing more work and are naturally going to have more overhead. With Dapper , at least with the way I used it, you're going to write your own SQL queries so there is nothing to optimize. I've even run into some nasty SQL server parameter sniffing issues. But despite that I still prefer the style over ORMs.
- bluejekyll 9y agoMyBatis is great for Java as well.
- sbov 9y agoWe use something like Dapper at where I work. I think for some projects it's fine, but for some a full ORM can really pay dividends. Especially if you're still working out your problem domain, all the hand crafted SQL can be a pain to update if you find you need to add just 1 more field, or if you figure out you need to split a table up because of a new unforseen feature, etc.
- flukus 9y agoDapper is great for reads but it doesn't handle complex updates nearly as well, although I'd argue most of those are architectural/design issues in nature.