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
fb04a9cb
Commit
fb04a9cb
authored
Nov 27, 2012
by
Sam
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #61 from TheDavester/master
Fixed DapperTable issue
parents
86d6454a
b82c2750
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
Tests.cs
Tests/Tests.cs
+18
-0
No files found.
Tests/Tests.cs
View file @
fb04a9cb
...
...
@@ -2253,6 +2253,24 @@ public void Open()
}
}
public
void
TestDapperTableMetadataRetrieval
()
{
// Test for a bug found in CS 51509960 where the following sequence would result in an InvalidOperationException being
// thrown due to an attempt to access a disposed of DataReader:
//
// - Perform a dynamic query that yields no results
// - Add data to the source of that query
// - Perform a the same query again
connection
.
Execute
(
"CREATE TABLE #sut (value varchar(10) NOT NULL PRIMARY KEY)"
);
connection
.
Query
(
"SELECT value FROM #sut"
).
IsSequenceEqualTo
(
Enumerable
.
Empty
<
dynamic
>());
connection
.
Execute
(
"INSERT INTO #sut (value) VALUES ('test')"
).
IsEqualTo
(
1
);
var
result
=
connection
.
Query
(
"SELECT value FROM #sut"
);
var
first
=
result
.
First
();
((
string
)
first
.
value
).
IsEqualTo
(
"test"
);
}
#if POSTGRESQL
class
Cat
...
...
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