-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Description
Version: 11.0.1
Question
With the new projection API, are there plans to include a ReverseMap() equivalent for IProjectionExpression<>? Or is the recommendation to simply create a separate map for the reverse direction.
The upgrade guide does not mention a path to follow for reverse mapping. It seems plausible that a IProjectionExpression<> could be reversed into an IMappingExpression<>.
Example
CreateProjection<Foo, Bar>()
.ForMember(d => d.Name, opt => opt.MapFrom(src => src.Thing.Name))
.ReverseMap() // Does not currently exist, would transition to IMappingExpression
// The reverse map would perform the following line for us
.ForPath(d => d.Thing.Name, opt => opt.MapFrom(src => src.Name));Metadata
Metadata
Assignees
Labels
No labels