Example #1
0
 private OQuery CreateMainQuery(string name, string folderName)
 {
     return(OQuery
            .From(name)
            .Let("FolderName", folderName)
            .Where("item => FolderName == $FolderName"));
 }
Example #2
0
        public IContentQuery <T> WhereEquals(string fieldName, object value)
        {
            var expression = new WhereEqualsExpression(this.Expression, fieldName, value);

            //
            if (this is TextContentQuery)
            {
                expression.OQueryExpression = OQuery
                                              .From((this as TextContentQuery).Schema.Name)
                                              .Where(string.Format("item=> item.{0} eq '{1}'", fieldName, value));
            }
            return(this.Create(expression));
        }
Example #3
0
        public IContentQuery <T> Take(int count)
        {
            var expression = new TakeExpression(this.Expression, count);

            //
            if (this is TextContentQuery)
            {
                expression.OQueryExpression = OQuery
                                              .From((this as TextContentQuery).Schema.Name)
                                              .Take(count);
            }

            return(this.Create(expression));
        }
Example #4
0
 public WhereContainsExpression(IExpression expression, string fieldName, object value)
     : base(expression, fieldName, value)
 {
     OQueryExpression = OQuery.From(null).Where(string.Format("item => item.{0}.Contains('{1}')", fieldName, value));
 }