Пример #1
0
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="provider"></param>
        public EntityQuery(EntityLinqProvider provider)
        {
            if (provider == null)
            {
                throw new ArgumentNullException(nameof(provider));
            }

            _provider   = provider;
            _expression = Expression.Constant(this);
        }
Пример #2
0
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="provider"></param>
        /// <param name="expression"></param>
        public EntityQuery(EntityLinqProvider provider, Expression expression)
        {
            if (provider == null)
            {
                throw new ArgumentNullException(nameof(provider));
            }
            if (expression == null)
            {
                throw new ArgumentNullException(nameof(expression));
            }

            _provider   = provider;
            _expression = expression;
        }