Minor documentation bug with anonymous types & parameters
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 78/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- csharp
- Domain
- documentation
Research direction
Open the parameters page at https://www.learndapper.com/parameters and inspect the anonymous-type example. Correct the constructor call so the example uses the syntax shown in the issue, then verify that the documented snippet compiles as written.
Written by the indexing model from the issue text.
Description
Super minor documentation bug, but on https://www.learndapper.com/parameters it says
Or you can pass an anonymous type:
var parameters = new DynamicParameters({ ProductId = 1 }); var sql = "select * from products where ProductId = @ProductId"; using (var connection = new SqlConnection(connString)) { var product = connection.QuerySingle<Product>(sql, parameters); }
when I think it should say
var parameters = new DynamicParameters(new { ProductId = 1 });
to get it to compile.
Thanks for the hard work with Dapper!
- Dominant language
- C#
- Stars
- 18.4k
- Forks
- 3.7k
- Avg merge
- 5h 8m
- Merged PRs (30d)
- 1
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.
More from DapperLib/Dapper
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
-
bug needs-triage
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
All issues in DapperLib/Dapper
Similar issues
-
priority-0
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
StackExchange/StackExchange.Redis#3249 ·
-
[Feat] 조합 영역 구분선 개선 Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100