src/Shared/EntityFramework/Core/Common/EntitySql/SemanticResolver.cs
// <summary>
// If <paramref name="valueExpr" /> returns a reference, then deref and try resolving <paramref name="name" /> as a property of the dereferenced value.
// </summary>
If  returns a reference, then deref and try resolving  as a property of the dereferenced value.
If returns a reference then deref and try resolving as a property of the dereferenced value .
private bool TryResolveAsRefPropertyAccess(DbExpression valueExpr, string name, ErrorContext errCtx, out DbExpression propertyExpr)
        {
            DebugCheck.NotNull(valueExpr);
            propertyExpr = null;
            if (TypeSemantics.IsReferenceType(valueExpr.ResultType))
            {
                DbExpression derefExpr = valueExpr.Deref();
                var derefExprType = derefExpr.ResultType;
                if (TryResolveAsPropertyAccess(derefExpr, name, out propertyExpr))
                {
                    return true;
                }
                else
                {
                    var message = Strings.InvalidDeRefProperty(name, derefExprType.EdmType.FullName, valueExpr.ResultType.EdmType.FullName);
                    throw EntitySqlException.Create(errCtx, message, null);
                }
            }
            return false;
        }
private bool TryResolveAsRefPropertyAccess ( DbExpression valueExpr , string name , ErrorContext errCtx , out DbExpression propertyExpr ) { DebugCheck . NotNull ( valueExpr ) ; propertyExpr = null ; if ( TypeSemantics . IsReferenceType ( valueExpr . ResultType ) ) { DbExpression derefExpr = valueExpr . Deref ( ) ; var derefExprType = derefExpr . ResultType ; if ( TryResolveAsPropertyAccess ( derefExpr , name , out propertyExpr ) ) { return true ; } else { var message = Strings . InvalidDeRefProperty ( name , derefExprType . EdmType . FullName , valueExpr . ResultType . EdmType . FullName ) ; throw EntitySqlException . Create ( errCtx , message , null ) ; } } return false ; }
If  returns a reference, then deref and try resolving  as a property of the dereferenced value.
If returns a reference then deref and try resolving as a property of the dereferenced value .
valueExpr
DbExpression
name
string
errCtx
ErrorContext
DbExpression
out