Why does the SqlParameter name/value constructor treat 0 as null?
As stated in the documentation for that constructor: When you specify an Object in the value parameter, the SqlDbType is inferred from the Microsoft .NET Framework type of the Object. Use caution when you use this overload of the SqlParameter constructor to specify integer parameter values. Because this overload takes a value of type Object, … Read more