'IPublishedContent' does not contain a definition for
I created a document type with a few properties and added permissions where users can add them from the homepage.
How do I access the poperties?
I tried the following but got an error saying :
Compiler Error Message: CS1061: 'IPublishedContent' does not contain a definition for 'EndDate' and not accessible extension method 'EndDate' accepting a first argument of type 'IPublishedContent' could be found (are you missing a using directive or an assembly reference?)
Code I used is as follows:
var testNode = Model.Value<IPublishedContent>("testNodePageLink");
var systemTests = testNode.Children.Where(x => x.IsVisible() && x.ContentType.Alias == "testItem");
var count = systemTests .Where(i => i.EndDate > DateTime.Now).Count();
'IPublishedContent' does not contain a definition for
I created a document type with a few properties and added permissions where users can add them from the homepage.
How do I access the poperties?
I tried the following but got an error saying :
Compiler Error Message: CS1061: 'IPublishedContent' does not contain a definition for 'EndDate' and not accessible extension method 'EndDate' accepting a first argument of type 'IPublishedContent' could be found (are you missing a using directive or an assembly reference?)
Code I used is as follows:
Installing ModelBuilder fixed my issue
https://our.umbraco.com/documentation/reference/templating/modelsbuilder/
is working on a reply...