Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Using Umbraco 8.1.0
I am trying to GetPagedChildren from IContentService with a IQuery
The multi-part identifier cmscontenttype alias could not be bound.
var filterQuery = Query<IContent>().Where(x => x.ContentType.Alias == "folderAlias");
var folder = _contentService.GetPagedChildren(1025, 1, 100, out long totalChildren, filterQuery).FirstOrDefault();
I build my service this way and added it to the composer.
private readonly IScopeProvider _scopeProvider;
protected IQuery<T> Query<T>() => _scopeProvider.SqlContext.Query<T>();
public MyService(IScopeProvider scopeProvider)
_scopeProvider = scopeProvider;
I have also tried this way, but it do not return anything.
var folder = _contentService.GetPagedChildren(1025, 1, 100, out long totalChildren).FirstOrDefault(x => x.ContentType.Alias.Equals("folderAlias"));
What do i do wrong?
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted