Try it and you'll get an error from Entity Framework.
The fix should be in MappingHelper.cs >>GetEntityMapping:
Like this:
foreach (var member in typeof(T).GetProperties().Cast<MemberInfo>().Concat(typeof(T).GetFields()))
{
var memberType = (member is PropertyInfo) ? ((PropertyInfo)member).PropertyType : ((FieldInfo)member).FieldType;
var baseType = Nullable.GetUnderlyingType(memberType) ?? memberType;
if (!allowedPropertyMapping.TryGetValue(baseType, out var allowedMappedProps))
throw new NotSupportedException("Not supported property type");
var mapProperty = allowedMappedProps.FirstOrDefault(x => allowedProperties.Contains(x));
if (mapProperty == null)
throw new NotSupportedException("Too complex object");
Expression inExp = Expression.MakeMemberAccess(inParam, member);
if (mapProperty.PropertyType != memberType)
inExp = Expression.Convert(inExp, mapProperty.PropertyType);
inMappingPairs.Add(new Tuple<MemberInfo, Expression>(mapProperty, inExp));
Try it and you'll get an error from Entity Framework.
The fix should be in MappingHelper.cs >>GetEntityMapping:
Like this: