Skip to content

Commit 3d3c28c

Browse files
committed
Fixing nullable DateTime to string default mapping
1 parent a9b7b7e commit 3d3c28c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

AgileMapper/TypeConversion/ToStringConverter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ private static Expression GetByteArrayToBase64StringConversion(Expression source
5656

5757
private static Expression GetDateTimeToStringConversion(Expression sourceValue, Type nonNullableSourceType)
5858
{
59-
var toStringMethod = GetToStringMethodOrNull(sourceValue.Type, typeof(IFormatProvider));
59+
var toStringMethod = GetToStringMethodOrNull(nonNullableSourceType, typeof(IFormatProvider));
6060
var currentCulture = Expression.Property(null, typeof(CultureInfo), "CurrentCulture");
6161
var dateTimeFormat = Expression.Property(currentCulture, typeof(CultureInfo), "DateTimeFormat");
6262

0 commit comments

Comments
 (0)