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
ca2e42f1
Commit
ca2e42f1
authored
Apr 23, 2011
by
Sam Saffron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playing with new api
parent
5aeded6a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
0 deletions
+22
-0
SqlMapper.cs
Dapper/SqlMapper.cs
+5
-0
Tests.cs
Tests/Tests.cs
+17
-0
No files found.
Dapper/SqlMapper.cs
View file @
ca2e42f1
...
@@ -217,6 +217,11 @@ public static List<T> ExecuteMapperQuery<T>(this IDbConnection cnn, string sql,
...
@@ -217,6 +217,11 @@ public static List<T> ExecuteMapperQuery<T>(this IDbConnection cnn, string sql,
return
rval
;
return
rval
;
}
}
public
static
List
<
T
>
ExecuteMapperQuery
<
T
,
U
>(
this
IDbConnection
cnn
,
string
sql
,
Action
<
T
,
U
>
map
,
object
param
=
null
,
IDbTransaction
transaction
=
null
)
{
return
null
;
}
private
static
Func
<
IDataReader
,
T
>
GetDeserializer
<
T
>(
Identity
identity
,
IDataReader
reader
)
private
static
Func
<
IDataReader
,
T
>
GetDeserializer
<
T
>(
Identity
identity
,
IDataReader
reader
)
{
{
object
oDeserializer
;
object
oDeserializer
;
...
...
Tests/Tests.cs
View file @
ca2e42f1
...
@@ -237,5 +237,22 @@ public void TestEnumerationDynamic()
...
@@ -237,5 +237,22 @@ public void TestEnumerationDynamic()
gotException
.
IsTrue
();
gotException
.
IsTrue
();
}
}
class
User
{
public
int
Id
{
get
;
set
;
}
public
string
Name
{
get
;
set
;
}
}
class
Post
{
public
int
Id
{
get
;
set
;
}
public
User
Owner
{
get
;
set
;
}
public
string
Content
{
get
;
set
;
}
}
public
void
TestMultiMap
()
{
var
test
=
connection
.
ExecuteMapperQuery
<
Post
,
User
>(
"select * from Posts p left join Users u on u.Id = p.OwnerId"
);
}
}
}
}
}
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