public override DbExpression Visit(DbRelationshipNavigationExpression expression) { Check.NotNull(expression, "expression"); DbExpression result = expression; RelationshipEndMember newFrom; RelationshipEndMember newTo; VisitRelationshipEnds(expression.NavigateFrom, expression.NavigateTo, out newFrom, out newTo); var newNavSource = VisitExpression(expression.NavigationSource); if (!ReferenceEquals(expression.NavigateFrom, newFrom) || !ReferenceEquals(expression.NavigateTo, newTo) || !ReferenceEquals(expression.NavigationSource, newNavSource)) { result = CqtBuilder.Navigate(newNavSource, newFrom, newTo); } NotifyIfChanged(expression, result); return(result); }