Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
Dapper
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
Dapper
Commits
7910f25b
Commit
7910f25b
authored
Oct 03, 2012
by
Marc Gravell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
When using AddDynamicParameters, watch out for duplicate parameters coming from templates
parent
2a94c2b2
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
80 additions
and
28 deletions
+80
-28
SqlMapper.cs
Dapper/SqlMapper.cs
+70
-28
Tests.cs
Tests/Tests.cs
+10
-0
No files found.
Dapper/SqlMapper.cs
View file @
7910f25b
This diff is collapsed.
Click to expand it.
Tests/Tests.cs
View file @
7910f25b
...
...
@@ -1916,6 +1916,16 @@ public void TestWrongTypes_WithWrongTypes()
item
.
D
.
Equals
(
true
);
}
public
void
Test_AddDynamicParametersRepeatedShouldWork
()
{
var
args
=
new
DynamicParameters
();
args
.
AddDynamicParams
(
new
{
Foo
=
123
});
args
.
AddDynamicParams
(
new
{
Foo
=
123
});
int
i
=
connection
.
Query
<
int
>(
"select @Foo"
,
args
).
Single
();
i
.
IsEqualTo
(
123
);
}
public
class
ParameterWithIndexer
{
public
int
A
{
get
;
set
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment