public static IMySqlSpecificTable<TSource> TableIndexHint<TSource>(this IMySqlSpecificTable<TSource> table, [SqlQueryDependent] string hint) where TSource : notnull { table.Expression = Expression.Call( null, MethodHelper.GetMethodInfo(TableIndexHint, table, hint), table.Expression, Expression.Constant(hint)); return table; }
public static IMySqlSpecificTable<TSource> TableIndexHint<TSource,TParam>( this IMySqlSpecificTable<TSource> table, [SqlQueryDependent] string hint, [SqlQueryDependent] params TParam[] hintParameters) where TSource : notnull { table.Expression = Expression.Call( null, MethodHelper.GetMethodInfo(TableIndexHint, table, hint, hintParameters), table.Expression, Expression.Constant(hint), Expression.NewArrayInit(typeof(TParam), hintParameters.Select(p => Expression.Constant(p, typeof(TParam))))); return table; }