Support Dapper overloads with CommandDefinition
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 was going crazy trying to figure out why no code was generated then I found this issue...
Are there any technical issues to implement this feature?
Sorry, did not find time for that yet. Will try to prioritize that :)
@DeagleGross, I see that the PR was created a few months ago. Are there any blockers preventing it from being merged? Do you need any help?
@goremykin there are some changes to be made, but it's up to Marc to review and merge changes once they are of a good quality.