public ClientQueryableCollection(IClient client, QueryCommand <T> command) { this.Provider = new ClientQueryProvider <T>(client, command); this.Expression = Expression.Constant(this); }
public ClientQueryProvider(IClient client, QueryCommand <T> command) { this.client = client; this.Command = command; }
public static QueryCommand <T> Expand <T>(this QueryCommand <T> command, string expression) { command.Expand.Add(expression); return(command); }
public static QueryCommand <T> Limit <T>(this QueryCommand <T> command, int limit) { command.Limit = limit; return(command); }
public static QueryCommand <T> Expand <T>(this QueryCommand <T> command, Expression <Func <T, Reference> > expression) { command.Expand.Add(new Expansion <T>(expression).ToString()); return(command); }
public static QueryCommand <T> Where <T>(this QueryCommand <T> command, string expression) { command.Where.Add(expression); return(command); }
public static QueryCommand <T> Sort <T>(this QueryCommand <T> command, Expression <Func <T, IComparable> > expression, SortDirection sortDirection = SortDirection.Ascending) { command.Sort.Add(new Sort <T>(expression, sortDirection).ToString()); return(command); }
public static QueryCommand <T> Offset <T>(this QueryCommand <T> command, int offset) { command.Offset = offset; return(command); }
public static QueryCommand <T> Where <T>(this QueryCommand <T> command, Expression <Func <T, bool> > expression) { command.Where.Add(new QueryPredicate <T>(expression).ToString()); return(command); }