U4-10794 - revert PEtaPocoMapper changes

This commit is contained in:
Stephan
2018-01-29 16:27:16 +01:00
parent e1208e5019
commit 5aa1b81cd4

View File

@@ -20,12 +20,6 @@ namespace Umbraco.Core.Persistence.Mappers
public Func<object, object> GetFromDbConverter(PropertyInfo pi, Type sourceType)
{
// Udi is handled as string
if (typeof(Udi).IsAssignableFrom(pi.PropertyType) && sourceType == typeof(string))
return value => value is string stringValue
? (string.IsNullOrWhiteSpace(stringValue) ? null : Udi.Parse(stringValue))
: null;
return null;
}
@@ -45,11 +39,7 @@ namespace Umbraco.Core.Persistence.Mappers
};
}
// Udi is handled as string
if (typeof(Udi).IsAssignableFrom(sourceType))
return value => value?.ToString();
return null;
}
}
}
}