Closed petrkasnal closed 1 year ago
A sample reproducing the error would help.
Testing your configuration against ProjectTo
without this library - may reproduce the same error.
A sample reproducing the error would help.
Testing your configuration against
ProjectTo
without this library - may reproduce the same error.
Thank you for your fast response. I tried ProjectTo and the problem is the same. And I think I even found out what it is. If both fields are not null enum, everything works as it should. But if both are nullable, there is a problem. But if I use mapper.Map the normal way, the nullable fields work. It even works if I have one mandatory and the other nullable.
You're probably missing a ForMember
in your config telling it how the conversion should work. Otherwise I would first reference the main project and pinpoint the cause. Then create a new issue if it looks like a bug - and post the repro.
Hi,
i use odata automapper extension.
var items = (_repository.GetAll().GetQuery(_mapper, request.Query)).ToList();
Everything working fine, but when i add enum to source and destination it not working. I give this error. I have Mapper on enums.'Unable to create a map expression from Bom.CheckStateType (System.Nullable1[StateType]) to Nullable1.StateType (System.Nullable`1[StateType])'