by extrememacaroni · 3y ago · 0 comments
The problem with automapper is that it throws the compiler out the window and invites all the bugs that would normally not be there.
Mapping code is still your code and should receive the same care as your fancy services.
I hate automapper, and I hate this too, just less because at least it has the potential to catch bugs at compile time… I think.
Some people really want to write libraries, I guess.
I've seen projects when Automapper was the main reason for the cold startup of an app, which caused terribly slow "write->build->run" developer experience.
So it's not only a problem of runtime exception vs compiler errors. Performance also matters.
> Mapping code is still your code and should receive the same care as your fancy services.
I've also seen project where all mapping code was written by hand and it was required to write unit test for it. It was also not pleasant.
“Yeah we may risk introducing more bugs but it’s so much nicer to develop now!”
It’s also OK to write libraries.
Some people really want to write mean comments, I guess.