-
Notifications
You must be signed in to change notification settings - Fork 13
Getting Started
Bart Read edited this page Oct 30, 2015
·
7 revisions
We wanted to make using Dapper.SimpleSave similar to using Dapper so, just like loading data with Dapper's API, you save objects by calling extension methods on IDbConnection.
Here's what you need to do to get up and running:
- Add the Dapper.SimpleSave Nuget package to your solution, and include it in any projects where you need to use it. The easiest way to do this is via the Package Manager Dialog in Visual Studio 2013 or 2015. To get to this, right-click your solution in Solution Explorer, then click Manage Nuget Packages for Solution.

-
Import the Dapper.SimpleSave namespace in any source files where you want to use Dapper.SimpleSave.
-
Decorate any DAOs or other objects you want to save to the database with appropriate SimpleSave attributes. Take a look at our first example to get you started.
-
Call extension methods on IDbConnection to save objects. We provide
Create<T>,CreateAll<T>,Update<T>,UpdateAll<T>,Delete<T>,DeleteAll<T>,SoftDelete<T>andSoftDeleteAll<T>. Check out the extension method reference for more information.