-
Notifications
You must be signed in to change notification settings - Fork 2.4k
add options to disable and override ExplicitExpansion #4327
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 options to disable and override ExplicitExpansion #4327
Conversation
@lbargaoanu i think i corrected almost everything. (apart from the override parameter that i really would like to talk about) |
base.Seed(context); | ||
} | ||
} | ||
protected override MapperConfiguration CreateConfiguration() => new(c => c.CreateProjection<Entity, Dto>().ForCtorParam("Name", o => o.ExplicitExpansion(false))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should use mapping inheritance, the same as the test below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lbargaoanu i added a new test for constructor mapping with inheritance (sorry for the long delay i needed to change my computer)
41d0619
to
0b9fbce
Compare
if you do that, you loose all the advantage of doing this pr ! |
Obviously it doesn't, all the existing tests pass. |
Well, that's what's needed here. The |
replace #4326
Pr to implement https://github.com/AutoMapper/AutoMapper/discussions/4325
from discussion from here : https://github.com/AutoMapper/AutoMapper/discussions/4323