If you want to pass null to a parameter, you need to pass DBNull.Value, as in your second example.
If you assign nulla parameter as the value, this parameter will not be sent to the procedure, which will cause the procedure to fail (if the parameter is required) or use the default value for the parameter, which may or may not be zero.
source
share