private OQuery CreateMainQuery(string name, string folderName) { return(OQuery .From(name) .Let("FolderName", folderName) .Where("item => FolderName == $FolderName")); }
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)); }
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)); }
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)); }