1

c# AutoMapper is SOSO good.. On paper...

Once you start using and thre is couple of levels of inheritance involved, it turns to shit.

Searched for fucking 5 hours a problem... Only to find "Oh yeah in this case you need to manually map properties"

Fuck you

JsonConvert.Deserialize(JsonConvert.Serialize(myShit)) it is

Comments
  • 1
    No statically typed language I know of can perform polymorphic deserialization without some sort of annotation, custom deserializer or some other mechanism.

    By definition, polymorphism isn't known until runtime, so it needs runtime mechanisms.

    I guess something can be done with reflection, but it'd be hard to make it work for absolutely all use cases.
  • 0
    AutoMapping and reflection is always bound to certain mechanisms and fail safes.

    ... Which usually means version upgrades can lead to change in behaviour and can lead to nasty runtime surprises.

    AutoMapping is a nice idea on paper, in reality it can make project maintenance a living hell.
  • 0
    even the author of automapper says it's only meant to solve simple problems (ie. he was lazy and wanted an easy way to convert some objects)
  • 0
    @iceb I would hold that most problems out there are simple. Many seemingly more complicated problems often turns out to be not so difficult.

    When in doubt, copy-paste.
Add Comment