/// <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 IOrderedQueryable <T> ToEntityInjectable <T>(this IOrderedQueryable <T> value, params Type[] whitelist)
 {
     return(value.EntityRewrite(new InjectableQueryRewriter(whitelist)));
 }
 /// <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="greenlist">A list of types to inject, whether marked as injectable or not.</param>
 /// <returns>A query proxy.</returns>
 public static IOrderedQueryable <T> ToEntityInjectable <T>(this IOrderedQueryable <T> value, params Type[] greenlist)
 => value.EntityRewrite(new InjectableQueryRewriter(greenlist));
 /// <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 IOrderedQueryable <T> ToEntitySubstitution <T>(this IOrderedQueryable <T> value, Type from, Type to)
 => value.EntityRewrite(new SubstitutionQueryRewriter(from, to));
Ejemplo n.º 4
0
 /// <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 IOrderedQueryable <T> ToEntityNullsafe <T>(this IOrderedQueryable <T> value)
 {
     return(value.EntityRewrite(new NullsafeQueryRewriter()));
 }
 /// <summary>
 /// Replaces methods of type <c>from</c> with methods of type <c>to</c>.
 /// </summary>
 /// <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 IOrderedQueryable ToEntitySubstitution(this IOrderedQueryable value, Type from, Type to)
 {
     return(value.EntityRewrite(new SubstitutionQueryRewriter(from, to)));
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Makes a query null-safe.
 /// </summary>
 /// <param name="value">A query.</param>
 /// <returns>A query proxy.</returns>
 public static IOrderedQueryable ToEntityNullsafe(this IOrderedQueryable value)
 => value.EntityRewrite(new NullsafeQueryRewriter());