示例#1
0
        /// <summary>
        /// Applies the predicate defined in this predicate builder to the result of SqlBuilder.Select().From().
        /// </summary>
        /// <param name="selectFrom">The result of the <see cref="SqlBuilder" /> select from method call.</param>
        /// <returns>
        /// The <see cref="IAndOrOrderBy" /> which is returned by the SqlBuilder after applying the Where clause.
        /// </returns>
        /// <exception cref="System.ArgumentNullException">thrown if selectFrom is null.</exception>
        public IAndOrOrderBy ApplyTo(IWhereOrOrderBy selectFrom)
        {
            if (selectFrom is null)
            {
                throw new ArgumentNullException(nameof(selectFrom));
            }

            return(selectFrom.Where(_builder.ToString(), _arguments.ToArray()));
        }
示例#2
0
        /// <summary>
        /// Applies the predicate defined in this predicate builder to the result of SqlBuilder.Select().From().
        /// </summary>
        /// <param name="selectFrom">The result of the <see cref="SqlBuilder" /> select from method call.</param>
        /// <returns>
        /// The <see cref="IAndOrOrderBy" /> which is returned by the SqlBuilder after applying the Where clause.
        /// </returns>
        /// <exception cref="System.ArgumentNullException">thrown if selectFrom is null.</exception>
        public IAndOrOrderBy ApplyTo(IWhereOrOrderBy selectFrom)
        {
            if (selectFrom == null)
            {
                throw new ArgumentNullException("selectFrom");
            }

            var where = selectFrom.Where(this.builder.ToString(), this.arguments.ToArray());

            return(where);
        }
示例#3
0
        /// <summary>
        /// Applies the predicate defined in this predicate builder to the result of SqlBuilder.Select().From().
        /// </summary>
        /// <param name="selectFrom">The result of the <see cref="SqlBuilder" /> select from method call.</param>
        /// <returns>
        /// The <see cref="IAndOrOrderBy" /> which is returned by the SqlBuilder after applying the Where clause.
        /// </returns>
        /// <exception cref="System.ArgumentNullException">thrown if selectFrom is null.</exception>
        public IAndOrOrderBy ApplyTo(IWhereOrOrderBy selectFrom)
        {
            if (selectFrom == null)
            {
                throw new ArgumentNullException("selectFrom");
            }

            var where = selectFrom.Where(this.builder.ToString(), this.arguments.ToArray());

            return where;
        }