This post was originally hosted on my site, https://consultwithgriff.com - check it out!
On the speaking circuit, I've been doing a good number ...
For further actions, you may consider blocking this person and/or reporting abuse
Thanks everyone for the great feedback. I've updated the article with some more examples and hopefully more detail.
I didn't want to turn this into a reference too much, so I can understand if there are unanswered questions. I'd love to help you explore more if I can. More follow up posts coming down the pipe.
I used to use EF heavily when it was database-first because I feel like that's how these types of libraries should be used. The jump to code-first left me confused because I didn't think about my systems like that.
And you're right, strongly typed queries are a big win. The number of times I've accidentally fat fingered a query going into Dapper or tried to map a datetime or a long. But that's far less pain than issues I've had with EF.
Thanks for the comment!
I use Dapper in pretty much every project now too. I've used it with MSSQL and Postgres. I also use it from F# -- it maps nicely onto F# record types. (I did have to add some type handlers for Option types.) Dapper is a great low investment, high return library.
Yes! Thank you for reminding me about type handlers! I need to write about them- because that's a great feature. I've written a handful myself. Extremely useful.
I totally agree. Dapper is my number one choice every time.
My first (and hopefully last) encounter with EntityFramework was back in one of it's early versions (IIRC 1.2) and it was terrible in every way. After that, I used to just build "populators" to iterate through dataReaders and populate my objects. I've only been working with Dapper for the last couple of years and I've barely scratched the surface of what it can do, but for my needs it's auto-mapping abilities is more than enough.
I think what I like most about it is what I hated most about EF - it's the fact I write my own SQL. I like SQL and I'm pretty damn good with it, if I might say so myself - and I consider that fact a great benefit over full-scale ORMs.
During my talk, I made a similar comment. I'm not amazing with SQL, but I'm pretty good for most stuff and I know how to write SQL that works well with my overall application.
With EF, it always felt like I was throwing a dart at the wall in a black box. I really like knowing what's going on, simply because I'm telling the library/framework to do it.
Thanks for the comment!
Really great article Kevin! Clears a lot of important questions on Dapper 👐🏻
Thank you for the kind words!
Our pleasure 😊
Check out Norm too:
dev.to/vbilopav/norm-data-access-f...
github.com/vbilopav/NoOrm.Net
Will do!
Yup - that's good feedback and I'm working on updates to help show off a bit more.