-
Notifications
You must be signed in to change notification settings - Fork 585
Getting Started
The following guide will walk you through getting started with Dapper Extensions with Dapper.
Dapper Extensions is shipped as a single file. This is necessary in order to prevent locking down on a single version of Dapper, which is also shipped as a single file.
Note: If you look at the source code, you will see that we actually have our code broken into multiple files. Before each release, we use a script (CombineFiles.ps1) to combine all of the classes into a single file.
Using Nuget (Recommended)
The easiest way to use Dapper Extensions is through Nuget. Simply issue the following command at the Package Manager Console in Visual Studio:
PM> Install-Package DapperExtensions
Manual Installation
Alternatively, you can clone the repository and execute the CombineFiles.ps1 script. This script will combine all of the appropriate files and then generate an output file. Simply include the output file in your project. The following script illustrates how to manually install Dapper Extensions:
Windows PowerShell
Copyright (C) 2009 Microsoft Corporation. All rights reserved.
PS C:\Windows\system32> cd C:\data\Dapper-Extensions
PS C:\data\Dapper-Extensions> .\CombineFiles.ps1
Extracting usings from DapperExtensions\ClassMapper.cs
Extracting usings from DapperExtensions\DapperExtensions.cs
Extracting usings from DapperExtensions\Predicates.cs
Extracting usings from DapperExtensions\PropertyMap.cs
Extracting usings from DapperExtensions\ReflectionHelper.cs
PS C:\data\Dapper-Extensions> cp .\nuget\DapperExtensions.cs.pp DapperExtensions.cs
PS C:\data\Dapper-Extensions> Get-ChildItem DapperExtensions.cs | Foreach-Object {
(Get-Content $_) | ForEach-Object {
$_.Replace('$rootnamespace$.','')
} | Set-Content -path $_
}
You will also need to include the latest version of Dapper in your project.