Closed tariano closed 1 year ago
@tariano I believe block expressions are not supported for code generation. Can you try moving your code to an external method and call that method as a inline expression instead?
Edit: Please see here: https://github.com/MapsterMapper/Mapster/wiki/Before-after-mapping
When using interface mapping with
AfterMapping
, like so:Then in the generated code, the
Action
is null, soAction1.Invoke(result)
results in null reference exception:That's the main: