Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Yasharth Tahiliani 8 posts 78 karma points
    May 20, 2021 @ 11:54
    Yasharth Tahiliani
    0

    Get Strongly Typed Content Umbraco 8

    Hi, I am migrating an Umbraco 7 site onto Umbraco 8, and would like to know the best way to get strongly typed Content in Umbraco 8. I have read that XPath shouldn't be used, and LINQ should be used instead, but what code can I use for this? I have the Node name with me in order to find the node. Could you please help?

  • Marc Goodson 2155 posts 14408 karma points MVP 9x c-trib
    May 20, 2021 @ 19:47
    Marc Goodson
    0

    Hi Yasharth

    It's all change in V8! - whereas in V7 the published cache was stored in XML format and therefore nothing could beat XPath for speed, now there is this new memory-based 'nucache' implementation which is optimized for Linq queries...

    (XPATH has been retained, for some of the concepts in Umbraco like 'setting the start node in a multinode tree picker' - but it is no longer suggested to use XPATH for querying on your site implementation - you can - but it's no longer the 'quickest' method,)

    Paul Seal and Tim Payne gave a talk at Umbraco Spark - before lockdown regarding their investigations into performance and querying in V8 and their slides are available here;

    https://umbracospark.com/media/p0xgaq2u/querying-umbraco.pptx

    The slides have some useful examples, and show the timings of accessing content in different ways between V7 and V8.. showing some of the places where certain strategies are faster than others.

    regards

    Marc

Please Sign in or register to post replies

Write your reply to:

Draft