gregor.tusar
02/11/2025, 12:52 PMvar config = umbracoHelper.ContentAtRoot().DescendantsOrSelfOfType(MySpecialConfiguration.ModelTypeAlias).FirstOrDefault() as MySpecialConfiguration;FirstOrDefault()RHamilton
02/11/2025, 2:53 PMvar rootNodes = umbracoHelper.ContentAtRoot();var storeSettings = umbracoHelper.ContentAtRoot().FirstOrDefault(x => x.ContentType.Alias == "storeProductSettings");var specificNode = rootNodes
    .SelectMany(root => root.DescendantsOrSelf())
    .FirstOrDefault(node => node.ContentType.Alias == MySpecialConfiguration.ModelTypeAlias);gregor.tusar
02/12/2025, 10:19 AM.SelectMany(root => root.DescendantsOrSelf())IPublishedContentQueryMike Chambers
02/12/2025, 5:45 PMMike Chambers
02/12/2025, 5:48 PMMike Chambers
02/12/2025, 5:51 PMRHamilton
02/12/2025, 6:48 PMJason
02/12/2025, 10:04 PM.Descendant<T>().Children.FirstOrDefault(x=> x is MyContentType).FirstChild<T>()Jason
02/12/2025, 10:23 PMSander L
02/13/2025, 6:45 AMgregor.tusar
02/13/2025, 10:30 AMStopwatch sw = Stopwatch.StartNew();
var config = umbracoHelper.ContentAtRoot().DescendantsOrSelfOfType(MySpecialConfiguration.ModelTypeAlias).FirstOrDefault() as MySpecialConfiguration;
Console.WriteLine($"content at root descendatas {sw.ElapsedMilliseconds} ms : {config?.Id}");
sw.Restart();
var config2 = umbracoHelper.ContentAtRoot().First()?.FirstChild<ConfigurationFolder>()?.Descendant<MySpecialConfiguration>();
Console.WriteLine($"content at first child descendatas {sw.ElapsedMilliseconds} ms: {config2?.Id}");content at root descendatas 7 ms : 7358
content at first child descendatas 7 ms: 7358
content at root descendatas 3 ms : 7358
content at first child descendatas 2 ms: 7358
content at root descendatas 6 ms : 7358
content at first child descendatas 9 ms: 7358Jason
02/13/2025, 10:55 PMumbracoHelper.ContentAtRoot().DescendantsOrSelfOfType(MySpecialConfiguration.ModelTypeAlias).FirstOrDefault()Umbraco.ContentAtRoot().FirstOrDefault().FirstChild<ConfigurationFolder>().FirstChild<MySpecialConfiguration>();Umbraco.ContentAtRoot().FirstOrDefault().Children.FirstOrDefault(x => x is ConfigurationFolder).Children.FirstOrDefault(x => x is MySpecialConfiguration);Sander L
02/14/2025, 7:50 PMSander L
02/14/2025, 7:51 PMMike Chambers
02/14/2025, 8:25 PMA hub and casual space for you to interact with fellow community members and learn more about Umbraco!
Powered by