From 44ff12eaaae04e79958b0e75dc2c3aae919d025c Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Fri, 14 Jun 2013 08:20:18 -0700 Subject: [PATCH] datamapper supports null and DBNull --- Marr.Data/Mapping/MappingHelper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marr.Data/Mapping/MappingHelper.cs b/Marr.Data/Mapping/MappingHelper.cs index ea4b9bb4c..5d25aaffe 100644 --- a/Marr.Data/Mapping/MappingHelper.cs +++ b/Marr.Data/Mapping/MappingHelper.cs @@ -58,7 +58,7 @@ namespace Marr.Data.Mapping dbValue = dataMap.Converter.FromDB(dataMap, dbValue); } - if (dbValue != DBNull.Value) + if (dbValue != DBNull.Value && dbValue != null) { dataMap.Setter(ent, dbValue); }