G
Guest
Hi all,
I call a stored procedure that returns a bunch of output parameters. And all
of those are nullable data. Is this the best approach to validating the
value? I don't want the value checked using IF and I am not using
SqlDataTypes as well.
itemId = parms[1].Value != null ||
!parms[1].Value.ToString().Equals(string.Empty) ? (int)parms[1].Value : 0;
itemGroupGuid = parms[2].Value != null ||
!parms[2].Value.ToString().Equals(Guid.Empty) ? (Guid)parms[2].Value :
Guid.Empty;
I call a stored procedure that returns a bunch of output parameters. And all
of those are nullable data. Is this the best approach to validating the
value? I don't want the value checked using IF and I am not using
SqlDataTypes as well.
itemId = parms[1].Value != null ||
!parms[1].Value.ToString().Equals(string.Empty) ? (int)parms[1].Value : 0;
itemGroupGuid = parms[2].Value != null ||
!parms[2].Value.ToString().Equals(Guid.Empty) ? (Guid)parms[2].Value :
Guid.Empty;