Data mapper

A lightweight data mapper which extends ADO.NET instead of hiding it. Supports both synchronous and asynchronous methods. The mapper also features detailed exception messages when an error happens so that you easily can understand what went wrong.

Do note that this is a mapping layer and not a OR/M. You still have to write your SQL queries, but with a simpler API. You can for instance write:

var users = connection.ToList<User>("firstName LIKE @1 AND lastName LIKE @2", firstName, lastName);

The mapper is based on mapping files where are provided to the mapping layer with the help of the EntityMappingProvider class. The default implementation (AssemblyScanningMappingProvider) searches all loaded assemblies after mappings.

Getting started

  1. To get started you need to create mappings as described here.
  2. Create a Unit Of Work, we have a unit of work factory.
  3. Use one of the API methods

There is also a repository pattern sample.

Database support

More info

Links