I got AutoMapperMappingException exception
Exception of type \'AutoMapper.AutoMapperMappingException\' was thrown. ---> System.InvalidCastException: I
Just in case if anyone want to try using a type converter
Mapper.CreateMap().ConvertUsing(new FooTypeConverter()); public class FooTypeConverter: TypeConverter { protected override DummyTypes.Foo? ConvertCore(int? source) { return source.HasValue ? (DummyTypes.Foo?)source.Value : null; } }
Cheers