Description
The constructor of CustomPropertyTypeMap
accepts two parameters. The propertySelector parameter is of type Func<Type, string, PropertyInfo>
. If I understand correctly this means that the function must always return a PropertyInfo. Returning null
is not allowed due to the project setting enable.
As the method public SqlMapper.IMemberMap? GetMember(string columnName)
is the only method that uses the propertySelector and is already capable of handling a null
return value, I would like to request to modify the constructor to (so changing the return type of the function from PropertyInfo
to PropertyInfo?
):
public CustomPropertyTypeMap(Type type, Func<Type, string, PropertyInfo?> propertySelector)
and of course the variable to:
private readonly Func<Type, string, PropertyInfo?> _propertySelector;