You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the Boxed.Mapping.MapperExtensions.Map method specifically checks whether source == null and throws an ArgumentNullException if so. It would be nice if it instead followed .NET nullable rules, and allowed a null source if the mapper defined a nullable type as source. In that case the destination would obviously also simply be null.
Instead, you currently have to do a workaround like: "var result = source == null ? null : _mapper.Map(source)" on every line calling a mapper where the source is a nullable type.
The text was updated successfully, but these errors were encountered:
Describe the feature
Currently the Boxed.Mapping.MapperExtensions.Map method specifically checks whether source == null and throws an ArgumentNullException if so. It would be nice if it instead followed .NET nullable rules, and allowed a null source if the mapper defined a nullable type as source. In that case the destination would obviously also simply be null.
Instead, you currently have to do a workaround like: "var result = source == null ? null : _mapper.Map(source)" on every line calling a mapper where the source is a nullable type.
The text was updated successfully, but these errors were encountered: