1

Is it possible to get all webs in Farm or WebApplication with one Linq to SharePoint query?

Now my data context constructor takes only takes one argument, and that is one web. This way I need to loop though all webs, which feels clumsy and inefficient.

2

OOTB Linq2SharePoint data context (generated by SPMetal) can be used in scope of web, not application. There is no easy way to expand the context to application scope.

  • Yep, +1, and in addition: as far as I know, the only way to fetch cross-SPWeb data in one request, is to use CAML queries in conjunction with SPSiteDataQuery and SPWeb.GetSiteData method. And cross-site collection - there is no such capability at all... – Andrey Markeev Sep 16 '11 at 18:03
  • To bad it is not possible. I hoped Linq to SharePoint would be easier to work with than CAML. – Tim Sep 17 '11 at 14:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.