G
Guest
I found this method code in Enterprise Library 2.0 and I really don't have
idea what does it mean.
public virtual void SetParameterValue(DbCommand command, string
parameterName, object value)
{
command.Parameters[BuildParameterName(parameterName)].Value = (value ==
null) ? DBNull.Value : value;
}
In my guess, the "(value == null) ? DBNull.Value : value" means if "value"
parameter is null assign "DBNull.Value", otherwise assign "value" to
command.Parameters[BuildParameterName(parameterName)].Value.
If this is not correct, please correct me guess.
Thank you,
Pound@Gestalt
idea what does it mean.
public virtual void SetParameterValue(DbCommand command, string
parameterName, object value)
{
command.Parameters[BuildParameterName(parameterName)].Value = (value ==
null) ? DBNull.Value : value;
}
In my guess, the "(value == null) ? DBNull.Value : value" means if "value"
parameter is null assign "DBNull.Value", otherwise assign "value" to
command.Parameters[BuildParameterName(parameterName)].Value.
If this is not correct, please correct me guess.
Thank you,
Pound@Gestalt