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
Why doesn't below code work?
var childrenInCat = Model.Parent.Children.Where<BlogPost>(x => x.blogPostCategory = category);
I get "Type IEnumerable is Defined in an assembly that is not reference.
Top of the page reads:
I am using the v8 compatible notation.
I've tried to follow documentation by appears that the only overload for Where I can use is Where<>(), documentation shows all examples with Where()
Really lost at this point.
I guess you have tried removing the <BlogPost> part? That should be inferred from the Children type which is IEnumerable<IPublishedContent>. If you want to cast them to BlogPost you can do:
Model.Parent.Children.Where(x => x.Id == 123).Select(x=> new BlogPost(x));
If you want to filter the children by doctype you can do:
Ok so this turned out to be some sort of .NET Visual Studio issue.
I've Googled the exception what was showing up when debugging the page.
you must add a reference to assembly 'netstandard, version=22.214.171.124, culture=neutral, publickeytoken=cc7b13ffcd2ddd51'.
Solution was to add following to Web.Config
<add assembly="netstandard, Version=126.96.36.199, Culture=neutral,
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted