Exemplo n.º 1
0
 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;
 }
Exemplo n.º 3
0
        public static QueryCommand <T> Expand <T>(this QueryCommand <T> command, string expression)
        {
            command.Expand.Add(expression);

            return(command);
        }
Exemplo n.º 4
0
        public static QueryCommand <T> Limit <T>(this QueryCommand <T> command, int limit)
        {
            command.Limit = limit;

            return(command);
        }
Exemplo n.º 5
0
        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);
        }
Exemplo n.º 6
0
        public static QueryCommand <T> Where <T>(this QueryCommand <T> command, string expression)
        {
            command.Where.Add(expression);

            return(command);
        }
Exemplo n.º 7
0
        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);
        }
Exemplo n.º 8
0
        public static QueryCommand <T> Offset <T>(this QueryCommand <T> command, int offset)
        {
            command.Offset = offset;

            return(command);
        }
Exemplo n.º 9
0
        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);
        }