There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
bool? conversion cause an exception
I have a MySQL table with a field as tinyint(1) with possible null value which will be mapped with a nullable boolean. The conversion fire an exception durant the mapping.
I investigate and find the cause at the line 126 of the file AutoMapper.cs :
I replace :
value = Convert.ChangeType(value, property.PropertyType)
value = Convert.ChangeType(value, Nullable.GetUnderlyingType(property.PropertyType) ?? property.PropertyType);
And it's working.