/// <summary> /// Applies dynamic modifiers to a collection. /// </summary> /// <typeparam name="TEntity"></typeparam> /// <param name="collection"></param> /// <param name="queryModifiers"></param> /// <returns></returns> public static IEnumerable <TEntity> Augment <TEntity>(this IEnumerable <TEntity> collection, QueryModifiers queryModifiers) { IQueryModifier <TEntity>[] mods = queryModifiers.GetModifiers <TEntity>(); return(collection.AugmentCollection(mods)); }
/// <summary> /// Applies dynamic modifiers to a query. /// </summary> /// <typeparam name="TEntity"></typeparam> /// <param name="query"></param> /// <param name="queryModifiers"></param> /// <returns></returns> public static IQueryable <TEntity> Augment <TEntity>(this IQueryable <TEntity> query, QueryModifiers queryModifiers) { IQueryModifier <TEntity>[] mods = queryModifiers.GetModifiers <TEntity>(); return(query.AugmentQuery(mods)); }