Esempio n. 1
0
 public EntityQuery(EntityQuery <T> query) : base(query)
 {
     DataServiceQuery = query.DataServiceQuery;
 }
Esempio n. 2
0
        /// <summary>
        /// Builds an <see cref="EntityQuery"/> tied to a specific <see cref="EntityGroup"/> based on a collection of <see cref="EntityKey"/>s
        /// </summary>
        /// <param name="keys"></param>
        /// <param name="entityQuery"></param>
        /// <returns></returns>
        private static EntityQuery AddWhereClause(EntityQuery entityQuery, IEnumerable <EntityKey> keys)
        {
            var lambda = BuildWhereLambda(keys);

            return(AddWhereClause(entityQuery, lambda));
        }
Esempio n. 3
0
 /// <summary>
 /// Returns a specified number of contiguous elements from the start of a sequence.
 /// </summary>
 /// <typeparam name="TSource"></typeparam>
 /// <param name="source"></param>
 /// <param name="count"></param>
 /// <returns></returns>
 /// <include file='EntityQueryExtensions.Examples.xml' path='//Class[@name="EntityQueryExtensions"]/method[@name="Skip2"]/*' />
 public static EntityQuery <TSource> Take <TSource>(this EntityQuery <TSource> source, int count)
 {
     return((EntityQuery <TSource>)Queryable.Take(source, count));
 }
Esempio n. 4
0
 /// <summary>
 /// Bypasses a specified number of elements in a sequence and then returns the remaining elements.
 /// </summary>
 /// <typeparam name="TSource"></typeparam>
 /// <param name="source"></param>
 /// <param name="count"></param>
 /// <returns></returns>
 /// <include file='EntityQueryExtensions.Examples.xml' path='//Class[@name="EntityQueryExtensions"]/method[@name="Skip2"]/*' />
 public static EntityQuery <TSource> Skip <TSource>(this EntityQuery <TSource> source, int count)
 {
     return((EntityQuery <TSource>)Queryable.Skip(source, count));
 }
Esempio n. 5
0
 /// <summary>
 /// Projects each element of a sequence into a new form.
 /// </summary>
 /// <typeparam name="TSource"></typeparam>
 /// <typeparam name="TResult"></typeparam>
 /// <param name="source"></param>
 /// <param name="selector"></param>
 /// <returns></returns>
 /// <include file='EntityQueryExtensions.Examples.xml' path='//Class[@name="EntityQueryExtensions"]/method[@name="Select1"]/*' />
 public static EntityQuery <TResult> Select <TSource, TResult>(this EntityQuery <TSource> source, Expression <Func <TSource, TResult> > selector)
 {
     return((EntityQuery <TResult>)Queryable.Select(source, selector));
 }
Esempio n. 6
0
 /// <summary>
 /// Sorts the elements of a sequence in descending order.
 /// </summary>
 /// <typeparam name="TSource"></typeparam>
 /// <typeparam name="TKey"></typeparam>
 /// <param name="source"></param>
 /// <param name="keySelector"></param>
 /// <returns></returns>
 /// <include file='EntityQueryExtensions.Examples.xml' path='//Class[@name="EntityQueryExtensions"]/method[@name="OrderByDescending"]/*' />
 public static EntityQuery <TSource> OrderByDescending <TSource, TKey>(this EntityQuery <TSource> source, Expression <Func <TSource, TKey> > keySelector)
 {
     return((EntityQuery <TSource>)Queryable.OrderByDescending(source, keySelector));
 }
Esempio n. 7
0
 /// <summary>
 /// Filters a sequence of values based on a predicate.
 /// </summary>
 /// <typeparam name="TSource"></typeparam>
 /// <param name="source1"></param>
 /// <param name="predicate"></param>
 /// <returns></returns>
 /// <include file='EntityQueryExtensions.Examples.xml' path='//Class[@name="EntityQueryExtensions"]/method[@name="Where1"]/*' />
 public static EntityQuery <TSource> Where <TSource>(this EntityQuery <TSource> source1, Expression <Func <TSource, bool> > predicate)
 {
     return((EntityQuery <TSource>)Queryable.Where(source1, predicate));
 }