In my data layer class, I initialize a parameter like so:
private int? _DependencyID;
public int? DependencyID
{ get {return _DependencyID;} set {_DependencyID
AFAIC, ADO.NET/SQL don't support nullable types this way.
The last example looks closest to correct to me. What kind of issues are you having with it? If you are just getting a compile error related to types, type cast your value to object:
(object)DependencyID.Value;
Since both values on either side of :
must be of the same type.