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
32b536a1
Commit
32b536a1
authored
Aug 22, 2019
by
mgravell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more test fixups
parent
d97932c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
ParameterTests.cs
Dapper.Tests/ParameterTests.cs
+4
-4
No files found.
Dapper.Tests/ParameterTests.cs
View file @
32b536a1
...
...
@@ -329,7 +329,7 @@ public void TestTVP()
try
{
connection
.
Execute
(
"CREATE TYPE int_list_type AS TABLE (n int NOT NULL PRIMARY KEY)"
);
connection
.
Execute
(
"CREATE PROC get_ints @integers int_list_type READONLY AS select * from @ints"
);
connection
.
Execute
(
"CREATE PROC get_ints @integers int_list_type READONLY AS select * from @int
eger
s"
);
var
nums
=
connection
.
Query
<
int
>(
"get_ints"
,
new
IntDynamicParam
(
new
int
[]
{
1
,
2
,
3
})).
ToList
();
Assert
.
Equal
(
1
,
nums
[
0
]);
...
...
@@ -341,11 +341,11 @@ public void TestTVP()
{
try
{
connection
.
Execute
(
"DROP PROC get_ints"
);
try
{
connection
.
Execute
(
"DROP PROC get_ints"
);
}
catch
{
}
}
finally
{
connection
.
Execute
(
"DROP TYPE int_list_type"
);
try
{
connection
.
Execute
(
"DROP TYPE int_list_type"
);
}
catch
{
}
}
}
}
...
...
@@ -377,7 +377,7 @@ public void TestTVPWithAdditionalParams()
try
{
connection
.
Execute
(
"CREATE TYPE int_list_type AS TABLE (n int NOT NULL PRIMARY KEY)"
);
connection
.
Execute
(
"CREATE PROC get_values @int
s int_list_type READONLY, @stringParam varchar(20), @dateParam datetime AS select i.*, @stringParam as stringParam, @dateParam as dateParam from @int
s i"
);
connection
.
Execute
(
"CREATE PROC get_values @int
egers int_list_type READONLY, @stringParam varchar(20), @dateParam datetime AS select i.*, @stringParam as stringParam, @dateParam as dateParam from @integer
s i"
);
var
dynamicParameters
=
new
DynamicParameterWithIntTVP
(
new
int
[]
{
1
,
2
,
3
});
dynamicParameters
.
AddDynamicParams
(
new
{
stringParam
=
"stringParam"
,
dateParam
=
new
DateTime
(
2012
,
1
,
1
)
});
...
...
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