コード例 #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;
 }
コード例 #3
0
        public static QueryCommand <T> Expand <T>(this QueryCommand <T> command, string expression)
        {
            command.Expand.Add(expression);

            return(command);
        }
コード例 #4
0
        public static QueryCommand <T> Limit <T>(this QueryCommand <T> command, int limit)
        {
            command.Limit = limit;

            return(command);
        }
コード例 #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);
        }
コード例 #6
0
        public static QueryCommand <T> Where <T>(this QueryCommand <T> command, string expression)
        {
            command.Where.Add(expression);

            return(command);
        }
コード例 #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);
        }
コード例 #8
0
        public static QueryCommand <T> Offset <T>(this QueryCommand <T> command, int offset)
        {
            command.Offset = offset;

            return(command);
        }
コード例 #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);
        }