예제 #1
0
        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);
        }
예제 #2
0
        /// <summary>
        ///     Visitor pattern method for <see cref="DbRelationshipNavigationExpression" />.
        /// </summary>
        /// <param name="expression"> The DbRelationshipNavigationExpression that is being visited. </param>
        /// <exception cref="ArgumentNullException">
        ///     <paramref name="expression" />
        ///     is null
        /// </exception>
        public override void Visit(DbRelationshipNavigationExpression expression)
        {
            Check.NotNull(expression, "expression");

            VisitExpression(expression.NavigationSource);
        }
 /// <summary>
 /// When overridden in a derived class, implements the visitor pattern for
 /// <see
 ///     cref="T:System.Data.Entity.Core.Common.CommandTrees.DbRelationshipNavigationExpression" />
 /// .
 /// </summary>
 /// <returns>A result value of a specific type.</returns>
 /// <param name="expression">
 /// The <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbRelationshipNavigationExpression" /> that is being visited.
 /// </param>
 public abstract TResultType Visit(DbRelationshipNavigationExpression expression);
 /// <summary>
 /// When overridden in a derived class, implements the visitor pattern for
 /// <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbRelationshipNavigationExpression" />
 /// .
 /// </summary>
 /// <param name="expression">
 /// The <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbRelationshipNavigationExpression" /> that is visited.
 /// </param>
 public abstract void Visit(DbRelationshipNavigationExpression expression);
 public override void Visit(DbRelationshipNavigationExpression expression)
 {
 }
예제 #6
0
 /// <summary>
 /// Visitor pattern method for <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbRelationshipNavigationExpression" />.
 /// </summary>
 /// <param name="expression"> The DbRelationshipNavigationExpression that is being visited. </param>
 /// <exception cref="T:System.ArgumentNullException">
 /// <paramref name="expression" />
 /// is null
 /// </exception>
 public override void Visit(DbRelationshipNavigationExpression expression)
 {
     Check.NotNull <DbRelationshipNavigationExpression>(expression, nameof(expression));
     this.VisitExpression(expression.NavigationSource);
 }