SamSaffron/dapper-dot-net — pull request #50 by longshine (2012-09-13 09:31:50+00:00)
Title: A type conversion is needed before setting value in GetTypeDeserializer

An invalid cast exception might be caused if the member type and the value type are not matched.
I found this issue when testing Dapper on MySQL. The case Tests.TestAbstractInheritance() in DapperTests falied on MySQL because it takes integers as Int64 by default, which leads to an invalid cast when setting properties (Int32).
I made a few modifications to convert value type to the member type, a very simple implementation that can only convert basic data types using System.Convert. Hope to be helpful.
btw, thanks to the greate job!