I'm trying to get a list of nodes to delete that are of a particular docType (myPage) but am having difficulty with the syntax as I can't see anything that will work. I have pseudo code below.
var cs = Services.ContentService;
var currentItemList = cs.GetDescendants(1234).Where(x=>x.NodeTypeAlias == "myPage");
Could someone tell me what the Lamda should be or isn't it done like this at all?
Content Service get Descendants that are a particular doctype
V7.15.3 UmbracoApiController
I'm trying to get a list of nodes to delete that are of a particular docType (myPage) but am having difficulty with the syntax as I can't see anything that will work. I have pseudo code below.
var cs = Services.ContentService;
var currentItemList = cs.GetDescendants(1234).Where(x=>x.NodeTypeAlias == "myPage");
Could someone tell me what the Lamda should be or isn't it done like this at all?
Any advice appreciated.
// Craig
Hi Craig,
I think it should be something like this:
~ Jonathan
Thanks Jonathan, spot on.
is working on a reply...