I tried to upgrade my solution from Automapper V8.1.1 to Automapper V9.0.0
but I faced one issue.
I have two scenarios with one map. In the first scenario I pass data to the resolution context:
attachments = _mapper.Map<Attachment[]>(objects.Items, opt => {
opt.Items[Constants.IncludeDescription] = true;
});
and another where I do not:
attachments = _mapper.Map<Attachment[]>(objects.Items);`
Automapper V9.0.0:

Automapper V8.1.1:

Everything working fine for Automapper 8.1.1 but with version 9.0.0 context.Items throws a System.InvalidOperationException (see images above) so I am not sure if this is a bug or not.
as @LucianBargaoanu noticed from 9.0.0 we need to provide _=>{} so resolutionContext.Items won't throw exception.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With