Description
Description
When using SetColumn/SetColumnOption with null/None, not sure why recently it bumps to "Parameter {ParameterName} must be set" Exception in Npgsql.
https://github.com/npgsql/npgsql/blob/dev/src/Npgsql/NpgsqlParameter.cs
Near line 628
Repro steps
Please provide the steps required to reproduce the problem
match value with
| null ->
se.SetColumnOption(idx, None)
| _ ->
se.SetColumn(idx, value)
After I use (from reflected method which I need to keep IDbConnection opened for batch transaction)
something like:
isdc.SubmitChangedEntity(se)
isdc.SubmitPendingChangesNoClose(dbConn)
Exception raised...
Expected behavior
I remembered I don't need to specified DBNull.Value before...
(In the fact, even I specified DBNull.Value, it still not works)
And null/None value should work.
Actual behavior
But recently when it doesn't work...
Known workarounds
Maybe what I bumped into was caused by my missed reflection...
If so, please just ignore me...