I just came across this video and you explain it very well. I just have a quick general question. With Dapper you write your own queries which is a lot more flexible than EF. What I do wonder is if you have a large project you have queries throughout the the entire application. I can imagine that it might become difficult to manage this and know where which queries are. How do you manage all your queries in a large (enterprise) application?
11:18 I don't recommend using Automapper, from bitter experience. With a project of any size, it suits team working very badly. Nobody knows what should or shouldn't go into a mapping, and it ends up as a mess. Then, ultimately, nobody knows what gets mapped to what. You are genuinely better off just having explicit mapping functions instead. If there's any doubt as to what gets mapped to what, you can just look at the mapping functions, and everything is explicitly in there. Automapper is one of those really nice ideas that turns out to be a menace in practice.
I completely agree! I was considering a video on this. I feel like a lot of people (including me in the past) immediately reach for AutoMapper out of habit. In reality, it's wayyy easier to just implement and follow your own explicit mapping functions. I've always found AutoMapper to be annoying to setup anyways. Thanks for bringing this up!
Hey Adison, I definitely will! I've played around with .NET MAUI previews and am looking forward to it, but I'm waiting for the official release before I start using it.
Sean always comes in clutch with the easy to digest and understand videos
Thanks for the tutorial. Just one observation, Dapper does object deconstruction so it is fine to use directly your DTO as dapper parameter object.
I just came across this video and you explain it very well. I just have a quick general question. With Dapper you write your own queries which is a lot more flexible than EF. What I do wonder is if you have a large project you have queries throughout the the entire application. I can imagine that it might become difficult to manage this and know where which queries are. How do you manage all your queries in a large (enterprise) application?
awesome tutorial as always! thank you for your hard work
Thanks Anecthor, and as always, thank you for being a long time supporter of the channel!
11:18 I don't recommend using Automapper, from bitter experience. With a project of any size, it suits team working very badly. Nobody knows what should or shouldn't go into a mapping, and it ends up as a mess. Then, ultimately, nobody knows what gets mapped to what. You are genuinely better off just having explicit mapping functions instead. If there's any doubt as to what gets mapped to what, you can just look at the mapping functions, and everything is explicitly in there. Automapper is one of those really nice ideas that turns out to be a menace in practice.
I completely agree! I was considering a video on this. I feel like a lot of people (including me in the past) immediately reach for AutoMapper out of habit. In reality, it's wayyy easier to just implement and follow your own explicit mapping functions. I've always found AutoMapper to be annoying to setup anyways. Thanks for bringing this up!
Hi. Have you thought about creating a new series with .NET MAUI?
Hey Adison, I definitely will! I've played around with .NET MAUI previews and am looking forward to it, but I'm waiting for the official release before I start using it.
Thanks dude!
hey, do you have a many-to-many relation video with enums. Like assigning User Privileges.
Thanks again
Thanks a lot, I was waiting for this
it’s about time
Dapper, my favorite ORM
Same!
Good job Sean!
Thanks Infinity :)
I love dapper, always use it in my projects. it lets me insert 1,5 mln of records in just 1,2 seconds (postgresql)
Very prof but too fast for me. Thanks.