-
-
Notifications
You must be signed in to change notification settings - Fork 141
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
Include all members from a nested member #453
Comments
How should it be used for other mappings? ie should it map |
@TimothyMakkison good question, didn't thought about this. I think this should diagnostic unless explicitly mapped. |
Should it support nested members? Something like: [Mapper]
partial class Mapper
{
[MapNestedProperties("Settings.Region"))]
public partial DocumentDto Map(Document doc);
// instead of:
[MapProperty("Settings.Locale", "Locale")]
[MapProperty("Settings.CurrencySymbol", "CurrencySymbol")]
public partial DocumentDto Map(Document doc);
} |
@TimothyMakkison intuitively I'd say it should support nested members. |
I am interested in this feature. Can I help? |
Checkout #598, looks like they tried to add this feature but never completed it |
Hi, what is the progress on this issue? This is a really useful and necessary feature. |
@mindotale nothing new, there was an PR #587 by @zeidoo which was never completed. |
🎉 This issue has been resolved in version 3.6.0-next.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
🎉 This issue has been resolved in version 3.6.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
If a class has a nested member which is flattened without the member name prefix, each member needs a manual
MapProperty
attribute to be mapped correctly. This could be simplified a lot by including all members of a nested property by one configuration attribute.Name proposal:
MapNestedPropertiesAttribute(string memberName)
(probably
MapNestedMembersAttribute
would be better as this includes fields and does not only apply to properties, but for backward compatibilityMapProperty
is called what it is, therefore the name should match).Example:
AutoMapper supports this via IncludeMembers.
See #447 (reply in thread).
The text was updated successfully, but these errors were encountered: