How to map DBO Object int property
"with ignoring it's lazy-load property object" to Domain Object Enum property
#1171
Replies: 1 comment 1 reply
-
When I removed the null-Conditional Operater from the method input and output, it did work fine: [MapProperty([nameof(UserDbo.StatusId)], [nameof(User.Status)])]
[MapperIgnoreSource(nameof(UserDbo.Status))]
internal static partial User MapToCore(this UserDbo user); // change form User? to User & UserDbo? to UserDbo But why it didn't check the added attributes when it was with null operator ? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have the following case, where my
UserDbo
class look like this:On the other hand, my domain class look like the following:
So when I do the map from the Domain to the DBO, it works fine, this is how it looks:
However, when mapping from DBO to Domain it gives me this error:
This is how I did the mapping from DBO to Domain:
What is the proper mapping for this ?
Beta Was this translation helpful? Give feedback.
All reactions