StackExchange/dapper-dot-net — pull request #137 by chilversc (2014-07-26 01:48:02+00:00)
Title: Automatically register a nullable custom type handler when registering a value type

This fixes issue #136 by registering the same handler for both the nullable and non-nullable versions of the type when the type is a value type.

Given the type Nullable, LookupDbType resolves this to the type handler for Foo.
The IL generator however resolves later resolves this to call, TypeCacheHandler>.SetValue
This then crashes with a NullReferenceException because TypeCacheHandler>.handler == null