DbQuery<TResult>

Description

Queries the database and returns a list of objects of type TResult.


Command

CommandType CommandType

The type of the command: Text, StoredProcedure, TableDirect.

MapperFunc ActivityFunc<DbDataReader,TResult>

This property allows you to specify a function that maps the query result to a list of objects. This function can be set through the activity designer by drawing a subworkflow. Specifically, two temporary variables will be provided: Argument, which represents a row of the table returned by the query, and Result (output), which represents the object on which you want to map the row. The subworkflow must take the data returned by the query row by row and transforms them into an object of the type of the Result parameter (if, for example, the activity returns an object of the IList <String> type, Result will be of String type).

The command parameters. This parameter can be configured through the appropriate section in the activity designer.

Sql InArgument<String> REQUIRED

The command text.


Connection

ConnectionString InArgument<String>

The database connection string.

ExternalConnectionExternalId InArgument<String>

The ExternalId of a DocsMarshal's external connection. Use this argument if the database you want to connect to is already stored in DocsMarshal external connections.

ExternalConnectionId InArgument<Guid>

The ID of a DocsMarshal's external connection. Use this argument if the database you want to connect to is already stored in DocsMarshal external connections.

ProviderName InArgument<String>

The name of the provider. For Microsoft Sql is 'System.Data.SqlClient' for example.


DocsMarshal Connection

Orchestrator InArgument<IManager>

The orchestrator object represents the connection to a DocsMarshal installation.

If this argument is left null the activity will work on the running installation. To work on another installation you must get its orchestrator by the activity DatabaseOrchestrator.

Feedback

AttemptsMade OutArgument<Int32>

The number of times DocsMarshal had to retry the command before being successful.


Misc

Result OutArgument<IList<TResult>>


Settings

CommandTimeout InArgument<Int32>

The time in seconds to wait for the command to execute.

RetryCount InArgument<Int32>

The number of times Docs Marshal must retry the command if it fails.