SqlScripter.Core/src/Data/SqlCommon.cs
/// <summary>
/// A cover method for <see cref="ExecCommand"/>, adds a <c>RETURN_VALUE</c> <see cref="SqlParameter"/>
/// then calls <see cref="ExecCommand"/>.
/// </summary>
/// <param name="sqlCmd">Command to execute</param>
/// <returns>Dataset returned by <see cref="ExecCommand"/></returns>
A cover method for , adds a RETURN_VALUE
then calls .
A cover method for adds a RETURN_VALUE then calls .
private static void EnsureReturnValueParameter(SqlCommand sqlCmd) {
            SqlParameterCollection sp = sqlCmd.Parameters;
            if (!sp.Contains("RETURN_VALUE")) {
                sp.Add("RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue;
            }
        }
private static void EnsureReturnValueParameter ( SqlCommand sqlCmd ) { SqlParameterCollection sp = sqlCmd . Parameters ; if ( ! sp . Contains ( " " ) ) { sp . Add ( " " , SqlDbType . Int ) . Direction = ParameterDirection . ReturnValue ; } }
A cover method for , adds a RETURN_VALUE
then calls .
A cover method for adds a RETURN_VALUE then calls .
Dataset returned by
Dataset returned by
sqlCmd
SqlCommand
Command to execute
Command to execute