Skip to content
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

add support automatic mapping generation for child classes #124

Closed
alirezanet opened this issue Oct 5, 2023 Discussed in #123 · 1 comment
Closed

add support automatic mapping generation for child classes #124

alirezanet opened this issue Oct 5, 2023 Discussed in #123 · 1 comment
Assignees
Labels
close fixed enhancement New feature or request

Comments

@alirezanet
Copy link
Owner

Discussed in #123

Originally posted by k94ll13nn3 October 5, 2023
Hello,

First thanks for this project, it is really useful.

I would like to be able to use the automatic generation of mapping (from the FixMapper method I saw in the repo) when using the Gridify method with custom maps added for some properties.

Using the sample from the documentation, I would like to be able to do this withtout specifiyng Contact.PhoneNumber. If I don't use a custom mapper, the mapping on Contact.PhoneNumber works, but if I use a custom mapper without Contact.PhoneNumber, it does not work anymore (in the sample I could use Contact.Address but my use cases are not as straighforward).

var mapper = new GridifyMapper<Person>()
            .GenerateMappings()
            .AddMap("address", p => p.Contact.Address)
            .AddMap("Contact.PhoneNumber", p => p.Contact.PhoneNumber); // I would like to remove this

Is it possible for now without having to respecify all possible mapping for basic parent.child properties ?

@alirezanet
Copy link
Owner Author

alirezanet commented Oct 5, 2023

this feature has been added to v2.11.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
close fixed enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant