I have recently run into a number of issues with SPMetal and LINQ to SharePoint that is making me wonder if it is worth it. In what cases does it make sense to use SPMetal and in what cases does it not work so well?

Areas that I found that require more code/work:


I avoid it, more work than it's worth. I asked similar a while ago: Frustrated! Linq to SharePoint, choice values, losing spaces. Enjoy the read ;)

  • 3
    Mostly avoid use of SPMetal tool. For below reasons: 1. Its difficult to maintain - regeneration required everytime you change the list 2. Unnecessary coding overhead for the above scenarios. – Anand Apr 24 '13 at 8:34
  • Is there ever a time it is worth using? Like if the lists wont change as users wont have access to them? – Ryan Erickson Apr 24 '13 at 15:17
  • Meh, the complexity of it all, it's just not worth it. Write a quick CAML query and then you can use Linq on the SPListItemCollection that gets returned for finer tuning or data manipulation. – David Lozzi Apr 25 '13 at 13:51
  • I just wish there was a better way, queries in CAML are a pain to write and read especially when they get more complex. – Ryan Erickson Apr 26 '13 at 21:28
  • True, have you seen the CAML Builder tools out there? They help create them much easier. – David Lozzi Apr 29 '13 at 13:03

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.