diff --git a/Dapper/SqlMapper.cs b/Dapper/SqlMapper.cs index d23e949a5..d8ac0fa01 100644 --- a/Dapper/SqlMapper.cs +++ b/Dapper/SqlMapper.cs @@ -1973,6 +1973,11 @@ private static Func GetDeserializer(Type type, DbDataReade } return GetTypeDeserializer(type, reader, startBound, length, returnNullIfFirstMissing); } + // Patch for nullable decimal issue + if (type == typeof(decimal?)) + { + return r => r.IsDBNull(startBound) ? (object)0m : r.GetDecimal(startBound); + } return GetSimpleValueDeserializer(type, underlyingType ?? type, startBound, useGetFieldValue); }