Build status Gitter

Note, I’m transitioning most of this work to my rebranded libraries Dapper.CX and Dapper.QX. I’m not sure I’ll be making changes to this repo anymore.

Postulate is a library of IDbConnection extension methods for performing CRUD actions in SQL Server and MySQL, made with Dapper. It also makes inline SQL more capable and testable via the Query class. Here are examples with FindAsync and SaveAsync.

using (var cn = GetConnection())
  // find a record
  var order = await cn.FindAsync<Order>(id);
  // create and save
  var employee = new Employee()
    FirstName = "Whoever",
    LastName = "Nobody",
    HireDate = new DateTime(2002, 3, 13)
  await cn.SaveAsync<Employee>(employee);

Why another ORM framework?

Getting Started

Install the Nuget package for your platform:

In the SQL Server package, there are three primary key types supported: int, long, and Guid. Import the appropriate namespace for the key type you want to use: Postulate.SqlServer.IntKey, LongKey, and GuidKey respectively. See SQL Server CRUD Methods

The MySql package supports only int key types via namespace Postulate.MySql.IntKey. See MySQL CRUD Methods

Both MySQL and SQL Server providers, as well as any new back-ends implemented should reference these base CRUD methods and surface them as extension methods.

Learn more at the Wiki.