Skip to content

Commit 3387019

Browse files
author
Nick Craver
committed
Merge remote-tracking branch 'origin/main' into pr/952
2 parents d603d43 + e9bdcb2 commit 3387019

File tree

186 files changed

+5682
-2808
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

186 files changed

+5682
-2808
lines changed

.github/workflows/main.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Main Build
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
paths:
9+
- '*'
10+
- '!/docs/*' # Don't run workflow when files are only in the /docs directory
11+
12+
jobs:
13+
vm-job:
14+
name: Ubuntu
15+
runs-on: ubuntu-latest
16+
services:
17+
postgres:
18+
image: postgres
19+
ports:
20+
- 5432/tcp
21+
env:
22+
POSTGRES_USER: postgres
23+
POSTGRES_PASSWORD: postgres
24+
POSTGRES_DB: test
25+
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
26+
sqlserver:
27+
image: mcr.microsoft.com/mssql/server:2019-latest
28+
ports:
29+
- 1433/tcp
30+
env:
31+
ACCEPT_EULA: Y
32+
SA_PASSWORD: "Password."
33+
mysql:
34+
image: mysql
35+
ports:
36+
- 3306/tcp
37+
env:
38+
MYSQL_ROOT_PASSWORD: root
39+
MYSQL_DATABASE: test
40+
steps:
41+
- name: Checkout code
42+
uses: actions/checkout@v1
43+
- name: .NET Build
44+
run: dotnet build Build.csproj -c Release /p:CI=true
45+
- name: Dapper Tests
46+
run: dotnet test tests/Dapper.Tests/Dapper.Tests.csproj -c Release --logger GitHubActions /p:CI=true
47+
env:
48+
MySqlConnectionString: Server=localhost;Port=${{ job.services.mysql.ports[3306] }};Uid=root;Pwd=root;Database=test;Allow User Variables=true
49+
OLEDBConnectionString: Provider=SQLOLEDB;Server=tcp:localhost,${{ job.services.sqlserver.ports[1433] }};Database=tempdb;User Id=sa;Password=Password.;
50+
PostgesConnectionString: Server=localhost;Port=${{ job.services.postgres.ports[5432] }};Database=test;User Id=postgres;Password=postgres;
51+
SqlServerConnectionString: Server=tcp:localhost,${{ job.services.sqlserver.ports[1433] }};Database=tempdb;User Id=sa;Password=Password.;
52+
- name: Dapper.Contrib Tests
53+
run: dotnet test tests/Dapper.Tests.Contrib/Dapper.Tests.Contrib.csproj -c Release --logger GitHubActions /p:CI=true
54+
env:
55+
MySqlConnectionString: Server=localhost;Port=${{ job.services.mysql.ports[3306] }};Uid=root;Pwd=root;Database=test;Allow User Variables=true
56+
OLEDBConnectionString: Provider=SQLOLEDB;Server=tcp:localhost,${{ job.services.sqlserver.ports[1433] }};Database=tempdb;User Id=sa;Password=Password.;
57+
PostgesConnectionString: Server=localhost;Port=${{ job.services.postgres.ports[5432] }};Database=test;User Id=postgres;Password=postgres;
58+
SqlServerConnectionString: Server=tcp:localhost,${{ job.services.sqlserver.ports[1433] }};Database=tempdb;User Id=sa;Password=Password.;
59+
- name: .NET Lib Pack
60+
run: dotnet pack Build.csproj --no-build -c Release /p:PackageOutputPath=%CD%\.nupkgs /p:CI=true

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,6 @@ Test.DB.*
1818
TestResults/
1919
Dapper.Tests/*.sdf
2020
Dapper.Tests/SqlServerTypes/
21-
.dotnet/*
21+
.dotnet/*
22+
BenchmarkDotNet.Artifacts/
23+
.idea/

Build.csproj

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<Project Sdk="Microsoft.Build.Traversal/2.0.24">
2+
<ItemGroup>
3+
<ProjectReference Include="benchmarks/**/*.csproj" />
4+
<ProjectReference Include="*/*.csproj" />
5+
<ProjectReference Include="tests/**/*.csproj" />
6+
</ItemGroup>
7+
</Project>

Dapper.Contrib/Dapper.Contrib.csproj

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,22 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<AssemblyName>Dapper.Contrib</AssemblyName>
4-
<PackageTags>orm;sql;micro-orm;dapper</PackageTags>
54
<Title>Dapper.Contrib</Title>
5+
<PackageTags>orm;sql;micro-orm;dapper</PackageTags>
66
<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>
77
<Authors>Sam Saffron;Johan Danforth</Authors>
8-
<TargetFrameworks>net451;netstandard1.3;netstandard2.0</TargetFrameworks>
9-
<!-- TODO: Docs -->
8+
<TargetFrameworks>net461;netstandard2.0;net5.0</TargetFrameworks>
109
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
10+
<NoWarn>$(NoWarn);CA1050</NoWarn>
1111
</PropertyGroup>
12-
<ItemGroup>
13-
<Compile Include="..\Dapper\TypeExtensions.cs" />
14-
</ItemGroup>
1512
<ItemGroup>
1613
<ProjectReference Include="..\Dapper\Dapper.csproj" />
1714
</ItemGroup>
18-
<ItemGroup Condition="'$(TargetFramework)' == 'net451'">
19-
<Reference Include="System.Data" />
20-
<Reference Include="System.Data.Linq" />
21-
<Reference Include="System" />
22-
<Reference Include="Microsoft.CSharp" />
23-
</ItemGroup>
24-
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' OR '$(TargetFramework)' == 'netstandard2.0'">
25-
<PackageReference Include="Microsoft.CSharp" Version="4.3.0" />
26-
</ItemGroup>
2715
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
28-
<PackageReference Include="System.Reflection.Emit" Version="4.3.0" />
16+
<PackageReference Include="System.Reflection.Emit" Version="4.7.0" />
17+
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
18+
</ItemGroup>
19+
<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
20+
<Reference Include="Microsoft.CSharp" />
2921
</ItemGroup>
3022
</Project>

Dapper.Contrib/Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ Special Attributes
118118
----------
119119
Dapper.Contrib makes use of some optional attributes:
120120

121-
* `[Table("Tablename")]` - use another table name instead of the name of the class
121+
* `[Table("Tablename")]` - use another table name instead of the (by default pluralized) name of the class
122122

123123
```csharp
124124
[Table ("emps")]

0 commit comments

Comments
 (0)