Closed jmathew closed 6 years ago
I think the fix for this will unfortunately be to rebrand a subset of the 'Translate' overloads to 'TranslateWithContext' or otherwise differentiating the different versions by name. We're relying on the compiler to be smarter than it is possible to be in this situation, and realistically not a lot is gained by simply overloading the same method so many times.
Claimed
Related to https://stackoverflow.com/q/46819033/730326
Steps to Reproduce
Given a model like so:
And a mapping like so:
Expected Behavior
No error. Compiles and provides expansion for the Pets. (ie
persons?include=[Name, LivingPets[Name]]
returns only the pets names not the whole object)Actual Behavior
On the
.Translate
line.Work around
If I change the lambda signature to
personConfig.Translate(fp => fp.LivingPets, (f, dict) => f.GetLivingPets());
it works just fine.Alternatively, if I rename
GetLivingPets()
toLivingPets()
I can remove the translation and it all works.