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
80c90d17
Commit
80c90d17
authored
Apr 28, 2011
by
Sam Saffron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
magic param failing test
parent
e4c939b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
Tests.cs
Tests/Tests.cs
+13
-2
No files found.
Tests/Tests.cs
View file @
80c90d17
...
...
@@ -424,12 +424,23 @@ public void MultiRSSqlCE()
cnn
.
Execute
(
"insert Posts values(2,'title2','body2',null)"
);
cnn
.
Execute
(
"insert Authors values(1,'sam')"
);
var
data
=
cnn
.
Query
<
PostCE
,
AuthorCE
>(
@"select * from Posts p left join Authors a on a.ID = p.AuthorID"
,
(
post
,
author
)
=>
{
post
.
Author
=
author
;
});
var
data
=
cnn
.
Query
<
PostCE
,
AuthorCE
>(
@"select * from Posts p left join Authors a on a.ID = p.AuthorID"
,
(
post
,
author
)
=>
{
post
.
Author
=
author
;
})
.
ToList
()
;
var
firstPost
=
data
.
First
();
var
title
=
firstPost
.
Title
;
firstPost
.
Title
.
IsEqualTo
(
"title"
);
firstPost
.
Author
.
Name
.
IsEqualTo
(
"sam"
);
data
[
1
].
Author
.
IsNull
();
cnn
.
Close
();
}
}
public
void
TestMagicParam
()
{
// magic params allow you to pass in single params without using an anon class
// this test fails for now, but I would like to support a single param by parsing the sql with regex and remapping.
var
first
=
connection
.
Query
(
"select @a as a"
,
1
).
First
();
Assert
.
IsEqualTo
(
first
.
a
,
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