DapperMan 1.0.0

dotnet add package DapperMan --version 1.0.0
NuGet\Install-Package DapperMan -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DapperMan" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DapperMan --version 1.0.0
#r "nuget: DapperMan, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install DapperMan as a Cake Addin
#addin nuget:?package=DapperMan&version=1.0.0

// Install DapperMan as a Cake Tool
#tool nuget:?package=DapperMan&version=1.0.0

DapperMan

A simple set of wrappers for Dapper to generate small SQL statements. Similar in concept to what you'll find in Dapper.Contrib, but with a consistent API and extra features.

Documentation

View the full documentation on github.

Basic Example

This generates a simple select statement. The result is an IEnumerable<T>, and TotalRows represents the length of the results.

(IEnumerable<Department> depts, int totalRows) = DapperQuery
    .Select("HumanResources.Department", connectionString)
    .Where("GroupName = @groupName")
    .Where("DepartmentName != @excludeDept")
    .OrderBy("GroupName")
    .OrderBy("DepartmentName")
    .Execute<Department>(new { groupName = "foo", excludeDept = "bar" });

You can also write your Where and OrderBy statements like this if you prefer:

    .Where("GroupName = @groupName AND DepartmentName != @excludeDept)
    .OrderBy("GroupName, DepartmentName")

Both will generate the same SQL (formatted for readability)

SELECT *
FROM HumanResources.Department
WHERE GroupName = @groupName
    AND DepartmentName != @excludeDept
ORDER BY GroupName, DepartmentName
Product Compatible and additional computed target framework versions.
.NET Framework net461 is compatible.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 1,025 6/27/2018