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
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)
The constructor of
CustomPropertyTypeMap
accepts two parameters. The propertySelector parameter is of typeFunc<Type, string, PropertyInfo>
. If I understand correctly this means that the function must always return a PropertyInfo. Returningnull
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 anull
return value, I would like to request to modify the constructor to (so changing the return type of the function fromPropertyInfo
toPropertyInfo?
):public CustomPropertyTypeMap(Type type, Func<Type, string, PropertyInfo?> propertySelector)
and of course the variable to:
private readonly Func<Type, string, PropertyInfo?> _propertySelector;
The text was updated successfully, but these errors were encountered: