Replies: 1 comment
-
|
Duplicate of #1285 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm looking to convert from automapper but I can't figure out what to look for for the equivilant of this:
UpdateContributionInputhas a bunch of fields with the same names asContributionEntitybut the types on the input side areOptional<>generics of the types on the entity side. If the types were the same we would have a mapperly version:but because (almost) all the properties on source are
Optional(for exampleOptional<string?> Commenton source vsstring? Commenton target), the properties are not being mapped properly since an implicit cast exists fromOptional<string?>tostring?(removed some namespaces and unnecessary code):For reference the Optional type:
Note:
[UserMapping]doesn't work because I need to consider the existing target value, I'm looking for something roughly like this:or
Beta Was this translation helpful? Give feedback.
All reactions