Closed maboivin closed 3 years ago
Hi @BlaiseD, I was able to test the scenario in a web app with version 4.1.2-alpha.0.7 and it solved the issue. Thanks for your quick response.
Now, could I ask you if there's any plan to release a new version?
Thanks again.
@maboivin the master branch targets AutoMapper.vNext. For a release you may PR the 4.1.3 branch. with the changes from PR 127. 4.1.3 is just a copy of 4.1.2 - which targets Automapper v10.1.1 and can be released.
Make sense?
@BlaiseD If I understood correctly, could you review https://github.com/AutoMapper/AutoMapper.Extensions.ExpressionMapping/pull/128?
Suppose the following LINQPad program:
When mapping the where expression
x => x.ShapeType == ShapeType.Circle
, it should map tox => (Convert(IIF((x Is Triangle), Triangle, IIF((x Is Circle), Circle, Unknown))) == 2)
but instead, it maps tox => (Convert(IIF((s Is Triangle), Triangle, IIF((s Is Circle), Circle, Unknown))) == 2)
where the parameterx
is not remapped to parameters
.It ultimately throws an
InvalidOperationException
with the messagevariable 's' of type 'UserQuery+Shape' referenced from scope '', but it is not defined
.Is there a configuration missing or could it be related to a specific case not handled in the
XpressionMapperVisitor
?