コード例 #1
0
 /// <summary>
 ///     Projects the source collection using the passed query parameters.
 /// </summary>
 /// <param name="source">The source items to filter.</param>
 /// <param name="filter">The projection to apply.</param>
 /// <typeparam name="T">The <see cref="Type" /> of items in the source collection.</typeparam>
 /// <returns>A projected enumeration of the source collection.</returns>
 public static IQueryable <object> Project <T>(this IQueryable <T> source, IModelFilter <T> filter)
 {
     return(filter == null?source.OfType <object>().AsQueryable() : filter.Project(source));
 }