Puts the value from the mapped class into the IDbCommand.

Namespace: NHibernate.Type
Assembly: NHibernate (in NHibernate.dll) Version: 3.2.0.4000 (3.2.0.4000)

Syntax

C#
public void NullSafeSet(
	IDbCommand cmd,
	Object value,
	int index
)
Visual Basic
Public Sub NullSafeSet ( _
	cmd As IDbCommand, _
	value As Object, _
	index As Integer _
)
Visual C++
public:
void NullSafeSet(
	IDbCommand^ cmd, 
	Object^ value, 
	int index
)

Parameters

cmd
Type: System.Data..::..IDbCommand
The IDbCommand to put the values into.
value
Type: System..::..Object
The object that contains the values.
index
Type: System..::..Int32
The index of the IDbDataParameter to write the value to.

Remarks

This method checks to see if value is null, if it is then the value of DBNull is written to the IDbCommand.

If the value is not null, then the method Set(IDbCommand, Object, Int32) is called and that method is responsible for setting the value.

See Also