csgsolutions - Csg.Data.Dapper 2.0.4-rc4

Extensions to use Dapper with Csg.Data.

PM> Install-Package Csg.Data.Dapper -Version 2.0.4-rc4 -Source https://www.myget.org/F/csgsolutions/api/v3/index.json

Copy to clipboard

> nuget.exe install Csg.Data.Dapper -Version 2.0.4-rc4 -Source https://www.myget.org/F/csgsolutions/api/v3/index.json

Copy to clipboard

> dotnet add package Csg.Data.Dapper --version 2.0.4-rc4 --source https://www.myget.org/F/csgsolutions/api/v3/index.json

Copy to clipboard
<PackageReference Include="Csg.Data.Dapper" Version="2.0.4-rc4" />
Copy to clipboard
source https://www.myget.org/F/csgsolutions/api/v3/index.json

nuget Csg.Data.Dapper  ~> 2.0.4-rc4
Copy to clipboard

> choco install Csg.Data.Dapper --version 2.0.4-rc4 --source https://www.myget.org/F/csgsolutions/api/v2

Copy to clipboard
Import-Module PowerShellGet
Register-PSRepository -Name "csgsolutions" -SourceLocation "https://www.myget.org/F/csgsolutions/api/v2"
Install-Module -Name "Csg.Data.Dapper" -RequiredVersion "2.0.4-rc4" -Repository "csgsolutions" -AllowPreRelease
Copy to clipboard

Csg.Data.Dapper

Dapper provides extension methods for IDbConnection. This library provides those same extensions for the Query Builder (IDbQueryBuilder) from Csg.Data.

CI and Pre-Release Feed

Build status

Early releases can be found on the CSG Public MyGet feed.

Get Started

Install the NuGet package

Example Usage

var activeProducts = await connection.QueryBuilder("dbo.Product")
    .Where(x => x.FieldEquals<bool>("IsActive", true))
    .QueryAsync<Product>();

Provided Dapper Methods

  • Query
  • QueryAsync
  • QueryFirst
  • QueryFirstAsync
  • QueryFirstOrDefault
  • QueryFirstOrDefaultAsync
  • QuerySingle
  • QuerySingleAsync
  • QuerySingleOrDefault
  • QuerySingleOrDefaultAsync

Other Methods

ToDapperCommand() provides a way to build a custom Dapper execution.

var dapperCmd = connection.QueryBuilder("dbo.Product")
    .Where(x => x.FieldEquals<bool>("IsActive", true))
    .ToDapperCommand();

// do something with native Dapper extension methods.
var data = await connection.QueryAsync(dapperCmd);
// etc
  • .NETFramework 4.5.1
    • Csg.Data (>= 3.1.7)
    • Dapper (>= 1.60.6)
  • .NETFramework 4.5.2
    • Csg.Data (>= 3.1.7)
    • Dapper (>= 1.60.6)
  • .NETFramework 4.6.1
    • Csg.Data (>= 3.1.7)
    • Dapper (>= 1.60.6)
  • .NETFramework 4.6.2
    • Csg.Data (>= 3.1.7)
    • Dapper (>= 1.60.6)
  • .NETFramework 4.7
    • Csg.Data (>= 3.1.7)
    • Dapper (>= 1.60.6)
  • .NETFramework 4.7.1
    • Csg.Data (>= 3.1.7)
    • Dapper (>= 1.60.6)
  • .NETFramework 4.7.2
    • Csg.Data (>= 3.1.7)
    • Dapper (>= 1.60.6)
  • .NETStandard 2.0
    • Csg.Data (>= 3.1.7)
    • Dapper (>= 1.60.6)
  • .NETFramework 4.5.1: 4.5.1.0
  • .NETFramework 4.5.2: 4.5.2.0
  • .NETFramework 4.6.1: 4.6.1.0
  • .NETFramework 4.6.2: 4.6.2.0
  • .NETFramework 4.7: 4.7.0.0
  • .NETFramework 4.7.1: 4.7.1.0
  • .NETFramework 4.7.2: 4.7.2.0
  • .NETStandard 2.0: 2.0.0.0

Owners

Justin Buchanan

Authors

CSG

Project URL

https://github.com/csgsolutions/csg.data.dapper

License

MIT

Info

9 total downloads
2 downloads for version 2.0.4-rc4
Download (70.84 KB)
Found on the current feed only

Package history

Version Size Last updated Downloads Mirrored?
3.0.9-rc1 64.06 KB Fri, 19 Aug 2022 20:37:31 GMT 1
2.0.6-rc4-g7799525d2b 73.54 KB Fri, 19 Aug 2022 20:24:28 GMT 1
2.0.4-rc4 70.84 KB Tue, 29 Oct 2019 12:57:45 GMT 2
2.0.2-rc3 70.75 KB Mon, 28 Oct 2019 02:14:25 GMT 1
2.0.0-rc2-00828 51.35 KB Fri, 18 Oct 2019 17:08:38 GMT 1
2.0.0-rc1-00806 51.37 KB Thu, 17 Oct 2019 02:59:28 GMT 1
1.0.4 31.01 KB Fri, 07 Sep 2018 03:44:04 GMT 2