DapperLib / DapperLib/DapperAOT
DAP013 - Tuple-type results are not currently supported - despite BindTupleByNameAttribute
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 472
- Forks
- 43
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 18
Description
Describe the bug
I am using [BindTupleByName] and use QuerySingleAsync to retern a tuple type. In the Error List I get the Message DAP013 - "Tuple-type results are not currently supported".
Where are you seeing this?
- what Dapper/Dapper.StrongName version?
<PackageReference Include="Dapper" Version="2.1.35" /> - what Dapper.AOT/Dapper.Advisor version?
<PackageReference Include="Dapper.AOT" Version="1.0.31" /> - if relevant: what database backend?
Microsoft Sql Server,<PackageReference Include="Microsoft.Data.SqlClient" Version="5.2.2" />
To Reproduce
[BindTupleByName]
public async Task<(int a, int b)> MyMethod(SqlConnection connection)
{
return await connection.QuerySingleAsync<(int a, int b)>("select 1 as a, 2 as b");
}
Expected behavior
As BindTupleByNameAttribute is specific to Dapper.AOT, I would have expected, that Dapper.AOT can return tuples...
Screenshots
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.
Research direction
Start by tracing the Dapper.AOT analysis for the provided QuerySingleAsync tuple result and the code path that emits diagnostic DAP013. Use the reported BindTupleByName example with SQL Server to reproduce the diagnostic; done means the tuple result is supported and the example no longer reports DAP013.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, sql
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100