jon wear's personal website

Getting Started With Dapper Part 3

12 July 2013

In part three I cover how to use alternate constructors for types used with Dapper. In parts 1 & 2 I used the default parameterless constructor but that doesn't work in every situation.

Dapper can also make use of a constructor that matches the type and field names returned in a recordset in addition to completely custom constructors that don't mach up to returned recordsets.

Lastly, I cover how to use a custom constructor and initialize a property during the Dapper mapping using Ling and a simple lambda expression.

Intro To Dapper - Part 3 from Jon Wear on Vimeo.

Source code:

By Jon Wear

Related articles