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
2b47b1a8
Commit
2b47b1a8
authored
May 12, 2011
by
Sam Saffron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added proc support
parent
8f561c93
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
25 deletions
+51
-25
SqlMapper.cs
Dapper/SqlMapper.cs
+27
-25
Tests.cs
Tests/Tests.cs
+24
-0
No files found.
Dapper/SqlMapper.cs
View file @
2b47b1a8
This diff is collapsed.
Click to expand it.
Tests/Tests.cs
View file @
2b47b1a8
...
@@ -507,6 +507,30 @@ public void TestSupportForParamDictionary()
...
@@ -507,6 +507,30 @@ public void TestSupportForParamDictionary()
p
.
Get
<
int
>(
"@age"
).
IsEqualTo
(
11
);
p
.
Get
<
int
>(
"@age"
).
IsEqualTo
(
11
);
}
}
public
void
TestProcSupport
()
{
var
p
=
new
DynamicParameters
();
p
.
Add
(
"@a"
,
11
);
p
.
Add
(
"@b"
,
dbType
:
DbType
.
Int32
,
direction
:
ParameterDirection
.
Output
);
p
.
Add
(
"@c"
,
dbType
:
DbType
.
Int32
,
direction
:
ParameterDirection
.
ReturnValue
);
connection
.
Execute
(
@"create proc #TestProc
@a int,
@b int output
as
begin
set @b = 999
select 1111
return @a
end"
);
connection
.
Query
<
int
>(
"#TestProc"
,
p
,
commandType
:
CommandType
.
StoredProcedure
).
First
().
IsEqualTo
(
1111
);
p
.
Get
<
int
>(
"@c"
).
IsEqualTo
(
11
);
p
.
Get
<
int
>(
"@b"
).
IsEqualTo
(
999
);
}
/* TODO:
/* TODO:
*
*
public void TestMagicParam()
public void TestMagicParam()
...
...
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