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
e2ebdb08
Commit
e2ebdb08
authored
Sep 14, 2017
by
Nick Craver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dapper.Contrib: netstandard2.0
parent
c747c632
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
Dapper.Contrib.csproj
Dapper.Contrib/Dapper.Contrib.csproj
+5
-2
SqlMapperExtensions.cs
Dapper.Contrib/SqlMapperExtensions.cs
+2
-2
No files found.
Dapper.Contrib/Dapper.Contrib.csproj
View file @
e2ebdb08
...
...
@@ -5,7 +5,7 @@
<Title>Dapper.Contrib</Title>
<Description>The official collection of get, insert, update and delete helpers for Dapper.net. Also handles lists of entities and optional "dirty" tracking of interface-based entities.</Description>
<Authors>Sam Saffron;Johan Danforth</Authors>
<TargetFrameworks>net451;netstandard1.3</TargetFrameworks>
<TargetFrameworks>net451;netstandard1.3
;netstandard2.0
</TargetFrameworks>
<!-- TODO: Docs -->
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
</PropertyGroup>
...
...
@@ -21,7 +21,10 @@
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.3'
OR '$(TargetFramework)' == 'netstandard2.0'
">
<PackageReference Include="Microsoft.CSharp" Version="4.3.0" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="System.Reflection.Emit" Version="4.3.0" />
</ItemGroup>
</Project>
\ No newline at end of file
Dapper.Contrib/SqlMapperExtensions.cs
View file @
e2ebdb08
...
...
@@ -516,7 +516,7 @@ private static class ProxyGenerator
private
static
AssemblyBuilder
GetAsmBuilder
(
string
name
)
{
#if NETSTANDARD1_3
#if NETSTANDARD1_3
|| NETSTANDARD2_0
return
AssemblyBuilder
.
DefineDynamicAssembly
(
new
AssemblyName
{
Name
=
name
},
AssemblyBuilderAccess
.
Run
);
#else
return
Thread
.
GetDomain
().
DefineDynamicAssembly
(
new
AssemblyName
{
Name
=
name
},
AssemblyBuilderAccess
.
Run
);
...
...
@@ -551,7 +551,7 @@ public static T GetInterfaceProxy<T>()
CreateProperty
<
T
>(
typeBuilder
,
property
.
Name
,
property
.
PropertyType
,
setIsDirtyMethod
,
isId
);
}
#if NETSTANDARD1_3
#if NETSTANDARD1_3
|| NETSTANDARD2_0
var
generatedType
=
typeBuilder
.
CreateTypeInfo
().
AsType
();
#else
var
generatedType
=
typeBuilder
.
CreateType
();
...
...
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