Trouble with retrieving content after updating from v8.0.2 to v8.2.1
In our code for v8.0.2 we used many times things like:
var Training = TrainingEvent.GetProperty( "training" ).Value<List<IPublishedContent>>().First();
But returining a List of IPublishedContent doesn't seem to work anymore in v8.2.1
On the macro's we can use a replacement like:
var Training = TrainingEvent.Value<Umbraco.Web.PublishedModels.Training>( "training" );
But in other classes "Umbraco.Web.PublishedModels.CLASSNAME" doesn't seem to be accessible!?
How do I get to the content in class code?
When debugging and placing a breakpoint, it actually states that the data is of the "Umbraco.Web.PublishedModels.CLASSNAME" type, but when using that type specifier the website errors out... (like the second code example above)
Trouble with retrieving content after updating from v8.0.2 to v8.2.1
In our code for v8.0.2 we used many times things like:
But returining a List of IPublishedContent doesn't seem to work anymore in v8.2.1 On the macro's we can use a replacement like:
But in other classes "Umbraco.Web.PublishedModels.CLASSNAME" doesn't seem to be accessible!? How do I get to the content in class code?
When debugging and placing a breakpoint, it actually states that the data is of the "Umbraco.Web.PublishedModels.CLASSNAME" type, but when using that type specifier the website errors out... (like the second code example above)
Thank you.
Apparently "List IPublishedContent" has changed to just "IPublishedContent" !?
If I use the following (anywhere), it works, so problem solved:
is working on a reply...