public ContentQueryResults QueryContent(ContentQueryCriteria criteria) { var repository = new RepositoryFactory().ContentRepository(); var elements = repository.Contents.OfType<ElementContent>().Where(criteria.WhereExpression); var results = new ContentQueryResults(); foreach (var element in elements) { results.Add(new ContentQueryResult() {ContentKey = element.ContentElementDefinition.Name, Content = element.Content}); } return results; }
public ContentQueryResults QueryContent(ContentQueryCriteria criteria) { var repository = new RepositoryFactory().ContentRepository(); var elements = repository.Contents.OfType <ElementContent>().Where(criteria.WhereExpression); var results = new ContentQueryResults(); foreach (var element in elements) { results.Add(new ContentQueryResult() { ContentKey = element.ContentElementDefinition.Name, Content = element.Content }); } return(results); }
public NeuCMSContent(ContentQueryResults content) { _results = content.Results; }