/// <summary> /// Returns a list of elements filtered by a given predicate. /// </summary> /// <typeparam name="T">The entity type.</typeparam> /// <param name="queryable">The queryable.</param> /// <param name="predicate">The predicate to filter the elements.</param> /// <returns></returns> public static List <T> ToList <T>(this ISpecificationQueryable <T> queryable, Expression <Func <T, bool> > predicate) { return(queryable.ToList(Relay <T, T>(q => q.Where(predicate)))); }
/// <summary> /// Returns a list of elements with an identity specification. /// </summary> /// <typeparam name="T">The entity type.</typeparam> /// <param name="queryable">The queryable.</param> /// <returns></returns> public static List <T> ToList <T>(this ISpecificationQueryable <T> queryable) { return(queryable.ToList(Identity <T>())); }