var selectCommand = DatabaseInstance.GetStoredProcCommand("GetReturnValue");
selectCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@anyname", DbType.Int16));
selectCommand.Parameters["anyname"].Direction = ParameterDirection.ReturnValue;
DatabaseInstance.ExecuteNonQuery(selectCommand);
var intReturnValue = Convert.ToInt64(selectCommand.Parameters["@ReturnValue"].Value);
//OR
var selectCommand = DatabaseInstance.GetStoredProcCommand("GetReturnValue");
DatabaseInstance.AddParameter(selectCommand, "anyname", DbType.Int32, ParameterDirection.ReturnValue, null, DataRowVersion.Default, null);
DatabaseInstance.ExecuteNonQuery(selectCommand);
var returnValue = Convert.ToInt32(DatabaseInstance.GetParameterValue(selectCommand, "anyname"));