I am working on a web part for installing sharepoint 2010. It has several sites, and each site has pages, and they can have sub-sites that have more pages and sites. I want to get a list of all pages of the entire installation that meet certain criteria (for example, title == "Test").
I can do this using the SPSiteDataQuery CAML object and set the 'Webs' property to <Webs Scope="Recursive" />. Obviously, this forces the request to consider the current site and all child elements.
On the other hand, I want to use linq2sp if possible, as this will provide an easier learning curve for other developers. Using SPMetal, I can create a DataContext for my site and then request it using linq, but this will only access the pages on the root site.
Is there a way to control the Linq query scope so that it works on all pages on all sites?
thanks s
Stark source
share