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
a161cb5a
Commit
a161cb5a
authored
May 01, 2015
by
Marc Gravell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CoreCLR build / 1.41-beta
parent
1fc06af5
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
1791 additions
and
154 deletions
+1791
-154
SqlMapper.cs
Dapper NET40/SqlMapper.cs
+432
-56
Program.cs
Dapper.DNX.Tests/Program.cs
+7
-6
project.json
Dapper.DNX.Tests/project.json
+16
-13
project.lock.json
Dapper.DNX.Tests/project.lock.json
+665
-28
Dapper.xproj
Dapper/Dapper.xproj
+3
-0
project.json
Dapper/project.json
+22
-11
project.lock.json
Dapper/project.lock.json
+646
-40
No files found.
Dapper NET40/SqlMapper.cs
View file @
a161cb5a
This diff is collapsed.
Click to expand it.
Dapper.DNX.Tests/Program.cs
View file @
a161cb5a
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
using
System.Linq
;
using
System.Linq
;
using
System.Data.SqlClient
;
using
System.Data.SqlClient
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
System.Reflection
;
namespace
Dapper.DNX.Tests
namespace
Dapper.DNX.Tests
{
{
...
@@ -9,7 +10,11 @@ public class Program
...
@@ -9,7 +10,11 @@ public class Program
{
{
public
void
Main
()
public
void
Main
()
{
{
#if DNXCORE50
Console
.
WriteLine
(
"From: {0}"
,
typeof
(
int
).
AssemblyQualifiedName
);
#else
Console
.
WriteLine
(
"Version: {0}"
,
Environment
.
Version
);
Console
.
WriteLine
(
"Version: {0}"
,
Environment
.
Version
);
#endif
const
string
connectionString
=
"Data Source=.;Initial Catalog=tempdb;Integrated Security=True"
;
const
string
connectionString
=
"Data Source=.;Initial Catalog=tempdb;Integrated Security=True"
;
using
(
var
conn
=
new
SqlConnection
(
connectionString
))
using
(
var
conn
=
new
SqlConnection
(
connectionString
))
{
{
...
@@ -18,16 +23,12 @@ public void Main()
...
@@ -18,16 +23,12 @@ public void Main()
Console
.
WriteLine
(
row
.
X
);
Console
.
WriteLine
(
row
.
X
);
var
methods
=
typeof
(
Dapper
.
SqlMapper
).
GetMethods
().
Where
(
x
=>
x
.
Name
==
"QueryAsync"
).
ToList
();
var
methods
=
typeof
(
Dapper
.
SqlMapper
).
GetMethods
().
Where
(
x
=>
x
.
Name
==
"QueryAsync"
).
ToList
();
#if ASYNC
row
=
conn
.
QueryAsync
<
Foo
>(
"select @a as X"
,
new
{
a
=
123
}).
Result
.
Single
();
row
=
conn
.
QueryAsync
<
Foo
>(
"select @a as X"
,
new
{
a
=
123
}).
Result
.
Single
();
#endif
Console
.
WriteLine
(
row
.
X
);
Console
.
WriteLine
(
row
.
X
);
}
}
}
}
private
static
async
Task
<
int
>
WithDelay
(
int
i
)
{
await
Task
.
Delay
(
100
);
return
i
;
}
class
Foo
class
Foo
{
{
public
int
X
{
get
;
set
;
}
public
int
X
{
get
;
set
;
}
...
...
Dapper.DNX.Tests/project.json
View file @
a161cb5a
...
@@ -6,32 +6,35 @@
...
@@ -6,32 +6,35 @@
"commands"
:
{
"commands"
:
{
"Dapper.DNX.Tests"
:
"Dapper.DNX.Tests"
"Dapper.DNX.Tests"
:
"Dapper.DNX.Tests"
},
},
"compilationOptions"
:
{
"define"
:
[
"ASYNC"
]},
"frameworks"
:
{
"frameworks"
:
{
"net45"
:
{
"net45"
:
{
"compilationOptions"
:
{
"define"
:
[
"ASYNC"
],
"warningsAsErrors"
:
true
},
"dependencies"
:
{
},
"frameworkAssemblies"
:
{
"System.Data"
:
"4.0.0.0"
}
},
"net40"
:
{
"dependencies"
:
{
"dependencies"
:
{
},
},
"frameworkAssemblies"
:
{
"frameworkAssemblies"
:
{
"System.Data"
:
"4.0.0.0"
"System.Data"
:
"4.0.0.0"
}
}
},
},
//
"net40"
:
{
//
"dependencies"
:
{
//
},
//
"frameworkAssemblies"
:
{
//
"System.Data"
:
"4.0.0.0"
//
}
//
},
"dnx451"
:
{
"dnx451"
:
{
"compilationOptions"
:
{
"define"
:
[
"ASYNC"
],
"warningsAsErrors"
:
true
},
"frameworkAssemblies"
:
{
"frameworkAssemblies"
:
{
"System.Data"
:
"4.0.0.0"
"System.Data"
:
"4.0.0.0"
}
}
},
"dnxcore50"
:
{
"compilationOptions"
:
{
"define"
:
[
],
"warningsAsErrors"
:
true
},
"dependencies"
:
{
"System.Console"
:
"4.0.0-beta-*"
,
"System.Reflection"
:
"4.0.10-beta-*"
}
}
}
//
"dnxcore50"
:
{
//
"dependencies"
:
{
//
"System.Console"
:
"4.0.0-beta-22716"
//
}
//
}
}
}
}
}
Dapper.DNX.Tests/project.lock.json
View file @
a161cb5a
This diff is collapsed.
Click to expand it.
Dapper/Dapper.xproj
View file @
a161cb5a
...
@@ -14,6 +14,9 @@
...
@@ -14,6 +14,9 @@
<PropertyGroup
Label=
"Configuration"
Condition=
"'$(Configuration)|$(Platform)'=='Release|AnyCPU'"
>
<PropertyGroup
Label=
"Configuration"
Condition=
"'$(Configuration)|$(Platform)'=='Release|AnyCPU'"
>
<AssemblyName>
Dapper
</AssemblyName>
<AssemblyName>
Dapper
</AssemblyName>
</PropertyGroup>
</PropertyGroup>
<PropertyGroup
Label=
"Configuration"
Condition=
"'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"
>
<AssemblyName>
Dapper
</AssemblyName>
</PropertyGroup>
<PropertyGroup>
<PropertyGroup>
<SchemaVersion>
2.0
</SchemaVersion>
<SchemaVersion>
2.0
</SchemaVersion>
</PropertyGroup>
</PropertyGroup>
...
...
Dapper/project.json
View file @
a161cb5a
{
{
"authors"
:
[
"Sam Saffron"
,
"Marc Gravell"
],
"authors"
:
[
"Sam Saffron"
,
"Marc Gravell"
],
"description"
:
"A high performance Micro-ORM supporting Sql Server, MySQL, Sqlite, SqlCE, Firebird etc.."
,
"description"
:
"A high performance Micro-ORM supporting Sql Server, MySQL, Sqlite, SqlCE, Firebird etc.."
,
"version"
:
"1.41-
alph
a"
,
"version"
:
"1.41-
bet
a"
,
"compile"
:
[
"../Dapper NET40/*.cs"
,
"../Dapper NET45/*.cs"
],
"compile"
:
[
"../Dapper NET40/*.cs"
,
"../Dapper NET45/*.cs"
],
"frameworks"
:
{
"frameworks"
:
{
"net45"
:
{
"net45"
:
{
"compilationOptions"
:
{
"define"
:
[
"ASYNC"
],
"warningsAsErrors"
:
true
},
"compilationOptions"
:
{
"define"
:
[
"ASYNC"
],
"warningsAsErrors"
:
true
},
"dependencies"
:
{
"dependencies"
:
{
"System.Runtime"
:
"4.0.20-beta-22816"
},
},
"frameworkAssemblies"
:
{
"frameworkAssemblies"
:
{
"System.Data"
:
"4.0.0.0"
"System.Data"
:
"4.0.0.0"
...
@@ -28,15 +29,25 @@
...
@@ -28,15 +29,25 @@
"System.Data"
:
"4.0.0.0"
"System.Data"
:
"4.0.0.0"
}
}
},
},
//
"dnxcore50"
:
{
"dnxcore50"
:
{
//
"dependencies"
:
{
"compilationOptions"
:
{
"define"
:
[
],
"warningsAsErrors"
:
true
},
//
"System.Runtime"
:
"4.0.20-beta-22716"
,
"dependencies"
:
{
//
"System.Data.Common"
:
"4.0.0-beta-*"
,
"System.Text.RegularExpressions"
:
"4.0.10-beta-*"
,
//
},
"System.Collections"
:
"4.0.10-beta-*"
,
//
"frameworkAssemblies"
:
{
"System.Collections.Concurrent"
:
"4.0.10-beta-*"
,
"System.Linq"
:
"4.0.0-beta-*"
,
//
//
"System.Threading"
:
"4.0.10-beta-*"
,
//
}
"Microsoft.CSharp"
:
"4.0.0-beta-*"
,
//
}
"System.Reflection"
:
"4.0.10-beta-*"
,
"System.Reflection.Emit"
:
"4.0.0-beta-*"
,
"System.Reflection.Emit.ILGeneration"
:
"4.0.0-beta-*"
,
"System.Reflection.Emit.Lightweight"
:
"4.0.0-beta-*"
,
"System.Reflection.TypeExtensions"
:
"4.0.0-beta-*"
,
"System.Data.Common"
:
"4.0.0-beta-*"
,
"System.Data.SqlClient"
:
"4.0.0-beta-*"
,
"System.Runtime.Extensions"
:
"4.0.10-beta-*"
,
"System.Text.Encoding.CodePages"
:
"4.0.0-beta-*"
}
}
}
}
}
}
Dapper/project.lock.json
View file @
a161cb5a
This diff is collapsed.
Click to expand it.
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