DapperLib / DapperLib/DapperAOT
Support Dapper overloads with CommandDefinition
Open
@DeagleGross is already working on this.
Since Sep 23, 2024.
analyzer
- Dominant language
- C#
- Stars
- 472
- Forks
- 43
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 18
Description
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);
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.