Esempio n. 1
0
        /// <summary>
        /// The WHERE clause, sometimes called the predicate, states the qualifying conditions for a query. Multiple conditions can be joined by boolean AND and OR clauses, optionally surrounded by (parentheses) to group them. The fields listed in a WHERE clause do not need to be listed in any SELECT clause.
        /// </summary>
        /// <param name="condition">Aggregate functions cannot be used in the WHERE clause.</param>
        public static IWhereBigQueryable <T> Where <T>(this IWhereBigQueryable <T> source, Expression <Func <T, bool> > condition)
        {
            if (source == null)
            {
                throw new ArgumentNullException("source");
            }
            if (condition == null)
            {
                throw new ArgumentNullException("condition");
            }

            var where = source as WhereBigQueryable <T>;
            if (where != null)
            {
                return(where.CombineWhere(condition));
            }
            else
            {
                return(new WhereBigQueryable <T>(source, condition));
            }
        }
Esempio n. 2
0
 public static ISelectBigQueryable <TResult> Select <TSource, TResult>(this IWhereBigQueryable <TSource> source, Expression <Func <TSource, TResult> > selector)
 {
     return(new SelectBigQueryable <TSource, TResult>(source, selector));
 }
Esempio n. 3
0
 public static ISelectBigQueryable <TSource> Select <TSource>(this IWhereBigQueryable <TSource> source)
 {
     return(new SelectBigQueryable <TSource, TSource>(source, null));
 }
Esempio n. 4
0
 public static IOrderByBigQueryable <TSource> OrderByDescending <TSource, TKey>(this IWhereBigQueryable <TSource> source, Expression <Func <TSource, TKey> > keySelector)
 {
     return(new OrderByBigQueryable <TSource, TKey>(source, keySelector, isDescending: true));
 }