Skip to content

How to map multiple properties to one? #1269

Closed Answered by latonz
Hantick asked this question in Q&A
Discussion options

You must be logged in to vote

Starting with Mapperly 3.6.0-next.1 you can use MapPropertyFromSource exactly for this: docs.
Would look sth. like this for you: [MapPropertyFromSource(nameof(DestinationItem.IsAccessible), Use = nameof(MapIsAccessible))].

However it may be easier to just introduce a get only property IsAccessible on your BasicItem.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@hansmbakker
Comment options

@latonz
Comment options

Answer selected by Hantick
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants