Ejemplo n.º 1
0
        /// <summary>
        ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
        ///     directly from your code. This API may change or be removed in future releases.
        /// </summary>
        protected override Expression VisitMember(MemberExpression node)
        {
            var newExpression = base.VisitMember(node);

            if (node.Expression != null)
            {
                if (node.Expression.Type.IsGrouping() &&
                    node.Member.Name == "Key")
                {
                    if (node.Expression is QuerySourceReferenceExpression qsre)
                    {
                        DemoteQuerySource(qsre.ReferencedQuerySource);
                    }
                }
                else
                {
                    _queryModelVisitor.BindMemberExpression(
                        node, (property, querySource) =>
                    {
                        if (querySource != null)
                        {
                            DemoteQuerySource(querySource);
                        }
                    });
                }
            }

            return(newExpression);
        }
Ejemplo n.º 2
0
        protected override Expression VisitMemberExpression(MemberExpression memberExpression)
        {
            var newExpression = base.VisitMemberExpression(memberExpression);

            _queryModelVisitor
            .BindMemberExpression(
                memberExpression,
                (property, querySource) => _querySources[querySource]--);

            return(newExpression);
        }
        /// <summary>
        ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
        ///     directly from your code. This API may change or be removed in future releases.
        /// </summary>
        protected override Expression VisitMember(MemberExpression node)
        {
            var newExpression = base.VisitMember(node);

            if (node.Expression != null)
            {
                _queryModelVisitor
                .BindMemberExpression(
                    node,
                    (property, querySource) =>
                {
                    if (querySource != null)
                    {
                        _querySources[querySource]--;
                    }
                });
            }

            return(newExpression);
        }
Ejemplo n.º 4
0
        protected override Expression VisitMember(MemberExpression memberExpression)
        {
            Check.NotNull(memberExpression, nameof(memberExpression));

            var newExpression = base.VisitMember(memberExpression);

            if (memberExpression.Expression != null)
            {
                _queryModelVisitor
                .BindMemberExpression(
                    memberExpression,
                    (property, querySource) =>
                {
                    if (querySource != null)
                    {
                        _querySources[querySource]--;
                    }
                });
            }

            return(newExpression);
        }