SamSaffron/dapper-dot-net — pull request #65 by jdaigle (2012-12-03 17:21:22+00:00)
Title: Simple Composite Entity Mapping Support

I've added support for Composite Entity Mapping. For reference, look at my test named TestCompositeEntity().

The idea is that to map the column names onto a simple entity graph. Using quoted column name identifiers (such as "Category.Name"), the mapper will get a property named "Category" and create it if necessary using the type's default ctor. It then maps the column onto the "Name" property of the "Category" instance.

This graph can be nested.

This was implemented primarily using a new subclass of ITypeMap and IMemberMap. A new property was added to IMemberMap to expose the nested property graph to IL generating method.

A new subroutine was added to handle the nested property graph (recursively creates the necessary properties and pushes it onto the stack to the receive the value).

It references this: http://code.google.com/p/dapper-dot-net/issues/detail?id=126