-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FR: Proposed changes to .Map #45
Comments
Any update on this? Estimation of V4 release date? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Proposed changes to .Map
Although the set-up is a bit different, I think some ideas from AutoMapper could be borrowed...
Currently the .Map function is a bit confusing to use.
First of all it will only be executed for properties where map via annotation failed (somehow feels as if it'd be conflicting with those annotations). And second: the given interface is hard to use (needs a lot of extra code).
Would consider (at least excel to object) following changes:
No1
have a ShouldMap function to replace the current .Map - first callback function (should map column)
should return
No2
the Map function should change as follows (to work similarly as in case of AutoMapper):
...and should allow to do any kind of data manipulation from the excel value, before assigning it to the destination property (even value type changes by parsing and so)
Currently we need to match column names as find property names before we can do any extra changes... This would be maybe the first thing i'd consider to change (to pass the matched propertyname to the call)!
No3
AfterMap / BeforeMap could also help to do extra manipulation
The text was updated successfully, but these errors were encountered: