NOTE: This method is now obsolete.
Do not call this method. Use AddWithValue instead.
Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value.
The index of the new NpgsqlParameter object.
Use caution when using this overload of the Add method to specify integer parameter values. Because this overload takes a value of type Object, you must convert the integral value to an Object type when the value is zero, as the following C# example demonstrates.
parameters.Add(":pname", Convert.ToInt32(0));If you do not perform this conversion, the compiler will assume you are attempting to call the NpgsqlParameterCollection.Add(string, DbType) overload.
NpgsqlParameterCollection Class | Npgsql Namespace | NpgsqlParameterCollection.Add Overload List