Extending the LINQ to SharePoint context to allow additional fields and properties in your queries

Author: Tobias Zimmergren [http://www.zimmergren.net](file:///C:/) | http://www.tozit.com | @zimmergren Introduction One of he culprits of working with the LINQ to SharePoint contexts that are being auto-generated for us is that it actually doesn’t necessarily render all the fields or properties you require. For example the built-in fields "Created By" or the "Attachments" property of a list item. Oftentimes we need these fields in our queries, whether they be CAML queries or LINQ queries. With LINQ to SharePoint you have the ability to extend an Entity that you’ve generated, and…

Read More

SP 2010: LINQ to SharePoint - What CAML lies behind my query?

Author: Tobias Zimmergren http://www.zimmergren.net | http://www.tozit.com | [@zimmergren](http://www.twitter.com/zimmergren) Introduction The two following questions are quite popular in my SharePoint 2010 developer training classes, so I ought to answer them right here. "What does LINQ to SharePoint really do?" "Can I see the CAML query generated by the LINQ to SharePoint query?" The answer is simple: Yes, you can see the results of your generated LINQ query by using the Log property of your DataContext object. What CAML lied behind my LINQ to SharePoint query? In order to…

Read More

SP 2010: Getting started with LINQ to SharePoint in SharePoint 2010

Author: Tobias Zimmergren http://www.zimmergren.net | http://www.tozit.com | [@zimmergren](http://www.twitter.com/zimmergren) Introduction In SharePoint 2010 you now have the ability to use LINQ syntax to fetch items from your lists instead of using the "traditional" approach of CAML queries. (Including SPSiteDataQuery and SPQuery objects) In this article I will give you a brief introduction to how you can get started using LINQ queries in SharePoint, also known as LINQ to SharePoint. Basics of LINQ? As a prerequisite to this article, I’m going to imply that you know what LINQ is and…

Read More

How to: LINQ with SharePoint - .NET 3.5 Framework with SharePoint Part 2

|---------|--------------------------------------------------| | Author: | Tobias Zimmergren (tobias at zimmergren dot net) | | Blog: | http://www.zimmergren.net | Introduction In my previous article title "How to: Get up and running with .NET 3.5 in your SharePoint environment" I talked about how you can manually set up your SharePoint environment for use with Microsoft .NET Framework 3.5. In this article I will talk about how you can incorporade some of the technologies used in .NET 3.5 to query a SharePoint list. More precisely, I will talk about how you easily can use LINQ from the .NET 3.5 framework…

Read More

LINQ to SharePoint

For those of you who’s new to LINQ (Language Integrated Query), here’s a brief description: "General-purpose query facilities added to the .NET Framework apply to all sources of information, not just relational or XML data. This facility is called .NET Language-Integrated Query (LINQ). " Read More about LINQ: http://msdn2.microsoft.com/en-us/library/bb308959.aspx I was just about to start up a new project where I wanted to make LINQ-like queries to SharePoint, but when I did some research I found out that there’s a CodePlex project called LINQ to SharePoint that does about…

Read More