Skip to content

Commit 753a57f

Browse files
committed
- v11.0.3
1 parent 8f540e7 commit 753a57f

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Shuttle.Core.Data/DataRowMapper.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,16 @@ private PropertyInfo[] GetPropertyInfo<T>()
8484
continue;
8585
}
8686

87-
pi.SetValue(result, value, null);
87+
if (value == DBNull.Value)
88+
{
89+
value = null;
90+
}
91+
92+
if (value != null ||
93+
Nullable.GetUnderlyingType(pi.PropertyType) != null)
94+
{
95+
pi.SetValue(result, value, null);
96+
}
8897
}
8998
catch
9099
{

0 commit comments

Comments
 (0)