public static IEnumerable <KeyValuePair <string, string> > AsODataQueryStringArguments <T>(this IQueryable <T> queryable) { if (queryable is null) { throw new ArgumentNullException(nameof(queryable)); } var client = new ArgumentCapturingODataDataClient(); ODataExpressionConverterSettings settings = ODataExpressionConverterSettings.Default; if (queryable.Provider is ODataQueryProvider <T> p) { settings = p.Settings; } var provider = new ODataQueryProvider <T>(client, settings); provider.Execute(queryable.Expression); return(client.QueryStringParamaters); }
internal ODataQueryable(ODataQueryProvider <TType> queryProvider, ODataExpressionConverterSettings settings, Expression expression) { Provider = queryProvider; Expression = expression; this.settings = settings; }
internal ODataQueryable(IODataDataClient client, ODataExpressionConverterSettings settings, Expression expression) : this(new ODataQueryProvider <TType>(client, settings), settings, expression) { }
public ODataQueryable(IODataDataClient client, ODataExpressionConverterSettings settings) : this(new ODataQueryProvider <TType>(client, settings), settings, null) { Expression = Expression.Constant(this); }