/// <summary> /// Replaces method calls with lambda expressions. /// </summary> /// <typeparam name="T">The type of the query data.</typeparam> /// <param name="value">A query.</param> /// <param name="whitelist">A list of types to inject, whether marked as injectable or not.</param> /// <returns>A query proxy.</returns> public static IAsyncQueryable <T> ToInjectable <T>(this IAsyncQueryable <T> value, params Type[] whitelist) { return(value.Rewrite(new InjectableQueryRewriter(whitelist))); }
/// <summary> /// Replaces methods of type <c>from</c> with methods of type <c>to</c>. /// </summary> /// <typeparam name="T">The type of the query data.</typeparam> /// <param name="value">A query.</param> /// <param name="from">A type to replace.</param> /// <param name="to">A type to use instead.</param> /// <returns>A query proxy.</returns> public static IAsyncQueryable <T> ToSubstitution <T>(this IAsyncQueryable <T> value, Type from, Type to) { return(value.Rewrite(new SubstitutionQueryRewriter(from, to))); }
/// <summary> /// Makes a query null-safe. /// </summary> /// <typeparam name="T">The type of the query data.</typeparam> /// <param name="value">A query.</param> /// <returns>A query proxy.</returns> public static IAsyncQueryable <T> ToNullsafe <T>(this IAsyncQueryable <T> value) { return(value.Rewrite(new NullsafeQueryRewriter())); }