Esempio n. 1
0
 /// <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> ToDbSubstitution <T>(this IOrderedQueryable <T> value, Type from, Type to)
 => value.DbRewrite(new SubstitutionQueryRewriter(from, to));
Esempio n. 2
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> ToDbNullsafe <T>(this IOrderedQueryable <T> value)
 => value.DbRewrite(new NullsafeQueryRewriter());
Esempio n. 3
0
 /// <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 ToDbSubstitution(this IOrderedQueryable value, Type from, Type to)
 {
     return(value.DbRewrite(new SubstitutionQueryRewriter(from, to)));
 }
 /// <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> ToDbInjectable <T>(this IOrderedQueryable <T> value, params Type[] whitelist)
 {
     return(value.DbRewrite(new InjectableQueryRewriter(whitelist)));
 }
 /// <summary>
 /// Makes a query null-safe.
 /// </summary>
 /// <param name="value">A query.</param>
 /// <returns>A query proxy.</returns>
 public static IOrderedQueryable ToDbNullsafe(this IOrderedQueryable value)
 {
     return(value.DbRewrite(new NullsafeQueryRewriter()));
 }
Esempio n. 6
0
 /// <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> ToDbInjectable <T>(this IOrderedQueryable <T> value, params Type[] greenlist)
 => value.DbRewrite(new InjectableQueryRewriter(greenlist));