Click or drag to resize

DbCommandInterceptorInterceptAsyncTResult Method

Begins a new Subsegment, executes the provided async operation, and records the request in the "sql" member of the subsegment.

Namespace:  Amazon.XRay.Recorder.Handlers.SqlServer
Assembly:  AWSXRayRecorder.Handlers.SqlServer (in AWSXRayRecorder.Handlers.SqlServer.dll) Version: 2.11.0+018bfa65877dd72e346735bad4d7ad46f217da09
Syntax
C#
public Task<TResult> InterceptAsync<TResult>(
	Func<Task<TResult>> method,
	DbCommand command
)

Parameters

method
Type: SystemFuncTaskTResult
command
Type: System.Data.CommonDbCommand

Type Parameters

TResult

Return Value

Type: TaskTResult

Implements

IDbCommandInterceptorInterceptAsyncTResult(FuncTaskTResult, DbCommand)
Examples
await InterceptAsync(() => dbCommand.ExecuteNonQueryAsync(cancellationToken), dbCommand);
See Also