Skip to content

6. Utility extensions

Vedran Bilopavlović edited this page Mar 26, 2021 · 6 revisions

Utility extensions for database object

As(CommandType type)

Sets all database commands for this connection to the given CommandType value.

AsProcedure()

Sets all database commands for this connection to type Procedure.

AsText()

Sets all database commands for this connection to type Text. This is the default.

Timeout(this DbConnection connection, int timeout)

Sets all database commands for this connection to wait time in seconds given by timeout parameter.

WithCancellationToken(CancellationToken cancellationToken)

Sets the token to monitor for cancellation requests for all async database commands for this connection.

Prepared()

Sets all database commands for this connection to prepared mode.

See also