I am using the Dapper overloads which accept a CommandDefinition because I want to pass CancellationToken, for example:
var result = await conn.ExecuteScalarAsync<string>(new CommandDefinition("sp_CrunchNumbers",
new
{
WarpFactor = 43
},
commandType: CommandType.StoredProcedure,
cancellationToken: cancellationToken));
The analyzer doesn't seem to detect this usage and generate code.
If I change to the overload which takes multiple args then it does generate code, however this doesn't support CancellationToken.
var result = await conn.ExecuteScalarAsync<string>("sp_CrunchNumbers",
new
{
WarpFactor = 43
},
commandType: CommandType.StoredProcedure);
I am using the Dapper overloads which accept a
CommandDefinitionbecause I want to passCancellationToken, for example:The analyzer doesn't seem to detect this usage and generate code.
If I change to the overload which takes multiple args then it does generate code, however this doesn't support
CancellationToken.