<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>LINQtoSharePoint Wiki &amp; Documentation Rss Feed</title><link>http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=Home</link><description>LINQtoSharePoint Wiki Rss Description</description><item><title>New Comment on "Samples"</title><link>http://linqtosharepoint.codeplex.com/wikipage?title=Samples&amp;ANCHOR#C25706</link><description>The only issue I see with all of this is that all testing must be performed in production.  The site&amp;#47;list cannot be set at runtime, therefore only production or test sites can be accessed.  Not both.</description><author>jdhavo</author><pubDate>Mon, 26 Nov 2012 18:05:56 GMT</pubDate><guid isPermaLink="false">New Comment on "Samples" 20121126060556P</guid></item><item><title>New Comment on "Samples"</title><link>http://linqtosharepoint.codeplex.com/wikipage?title=Samples&amp;ANCHOR#C20625</link><description>Thanks for posting this &amp;#40;though has it been 4 years ago already&amp;#41;.&amp;#10;&amp;#10;There&amp;#39;s one thing, about querying choice-lists&amp;#58;&amp;#10;&amp;#10;I&amp;#39;m currently trying to query a list with a filter on a single-choice field. Code looks like this&amp;#58;&amp;#10;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#10;from r in ppbData.P_Planverzoek&amp;#10;where r.StatusPlanverzoek &amp;#61;&amp;#61; StatusPlanverzoek.Ingepland&amp;#10;select r.StatusPlanverzoek&amp;#59;&amp;#10;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#61;&amp;#10;&amp;#10;Where ppbData is the datacontext, created by SPMetal.&amp;#10;&amp;#10;However, the where-clause is n&amp;#243;t be&amp;#239;ng translated into CAML, so it first retrieves the whole list to memory, then uses LINQ to Object to do actually perform the where-clause.&amp;#10;&amp;#10;Do you happen to have any idea as to how to filter on a specific choice, that will get properly translated to CAML&amp;#63;&amp;#10;&amp;#10;Thanks in advance &amp;#58;&amp;#41;</description><author>Assgier</author><pubDate>Wed, 10 Aug 2011 16:40:33 GMT</pubDate><guid isPermaLink="false">New Comment on "Samples" 20110810044033P</guid></item><item><title>UPDATED WIKI: Home</title><link>http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=Home&amp;version=33</link><description>&lt;div class="wikidoc"&gt;
&lt;h2&gt;
Introduction
&lt;/h2&gt; &lt;br /&gt;The LINQ to SharePoint project provides a custom query provider for LINQ that allows to query SharePoint lists using familiar LINQ syntax. LINQ stands for Language Integrated Query and is one of the core features of Microsoft's .NET Framework 3.5 release. More information can be found via the MSDN website on &lt;a href="http://msdn.microsoft.com" class="externalLink"&gt;http://msdn.microsoft.com&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;Visit our &lt;b&gt;team blog&lt;/b&gt; at &lt;a href="http://blogs.bartdesmet.net/LINQtoSharePoint" class="externalLink"&gt;http://blogs.bartdesmet.net/LINQtoSharePoint&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;. Also check out this &lt;b&gt;Channel 9&lt;/b&gt; &lt;a href="http://channel9.msdn.com/ShowPost.aspx?PostID=353173" class="externalLink"&gt;geekSpeak video&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
Features
&lt;/h2&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;Custom query provider that translates LINQ queries to &lt;b&gt;CAML&lt;/b&gt;, the &lt;a href="http://msdn2.microsoft.com/en-us/library/ms462365.aspx" class="externalLink"&gt;Collaborative Application Markup Language&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; used by SharePoint for querying.&lt;/li&gt;&lt;li&gt;Support for LINQ in &lt;b&gt;C# 3.0&lt;/b&gt; and &lt;b&gt;Visual Basic 9.0&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Entity creation tool &lt;b&gt;&lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=SpMetal&amp;amp;referringTitle=Home"&gt;SpMetal&lt;/a&gt;&lt;/b&gt; to export SharePoint list definitions to entity classes used for querying.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Visual Studio 2008 integration&lt;/b&gt; for entity creation (a.k.a. &lt;b&gt;SPML&lt;/b&gt;).&lt;/li&gt;&lt;li&gt;Can connect to a SharePoint site either using the &lt;b&gt;SharePoint object model&lt;/b&gt; or via the &lt;b&gt;SharePoint web services&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Planned support for &lt;b&gt;updating&lt;/b&gt; through entity types.&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
Status
&lt;/h2&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;11/29/2007 - &lt;b&gt;&lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=8713"&gt;v0.2.4.0 alpha release&lt;/a&gt; for .NET Framework 3.5 and Visual Studio 2008 RTM&lt;/b&gt; (&lt;a href="http://community.bartdesmet.net/blogs/linqtosharepoint/archive/2007/11/30/now-available-0-2-4-0-alpha-for-orcas-rtm.aspx" class="externalLink"&gt;release bulletin&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;08/13/2007 - &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=6400"&gt;v0.2.3.0 alpha release&lt;/a&gt; available for Orcas Beta 2 (&lt;a href="http://community.bartdesmet.net/blogs/linqtosharepoint/archive/2007/08/14/alpha-0-2-3-now-available.aspx" class="externalLink"&gt;release bulletin&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;).&lt;/li&gt;&lt;li&gt;08/01/2007 - Sources updated for Orcas Beta 2. A new release targeting Orcas Beta 2 will be provided soon.&lt;/li&gt;&lt;li&gt;07/20/2007 - &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=5973"&gt;v0.2.2.0 alpha release&lt;/a&gt; available for Orcas Beta 1 (&lt;a href="http://community.bartdesmet.net/blogs/linqtosharepoint/archive/2007/07/20/the-0-2-2-alpha-interim-release-an-overview.aspx" class="externalLink"&gt;release bulletin&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;).&lt;/li&gt;&lt;li&gt;07/06/2007 - We're currently working on an interim release that focuses on code maintainability and some design changes to enable the 0.3 update feature set. This interim release will be the first to cover &lt;a href="http://community.bartdesmet.net/blogs/linqtosharepoint/archive/2007/07/04/linq-to-sharepoint-introducing-spml.aspx" class="externalLink"&gt;SPML&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; and Visual Studio 2008 integration with a code generator and an improved debugger visualizer.&lt;/li&gt;&lt;li&gt;06/30/2007 - &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=5390"&gt;v0.2.0.0 alpha release&lt;/a&gt; available for Orcas Beta 1 (&lt;a href="http://community.bartdesmet.net/blogs/linqtosharepoint/archive/2007/07/03/linq-to-sharepoint-alpha-v0-2-available.aspx" class="externalLink"&gt;release bulletin&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;).&lt;/li&gt;&lt;li&gt;06/08/2007 - The 0.2 release is planned to become available later this month; the (draft of the) technical spec is now under source control too (/Specs folder).&lt;/li&gt;&lt;li&gt;05/04/2007 - Work has started on the 0.2 release. The 0.2 release will cover enhanced support for different field types in SharePoint, including Lookup fields, and extended overall test coverage.&lt;/li&gt;&lt;li&gt;04/23/2007 - &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=3637"&gt;v0.1.2.0 alpha release&lt;/a&gt; available for Orcas March 2007 CTP (update for Beta 1 coming soon).&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
Samples
&lt;/h2&gt; &lt;br /&gt;For a list of samples and a quick-start guide, see &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=Samples&amp;amp;referringTitle=Home"&gt;Samples&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
C# sample
&lt;/h3&gt; &lt;br /&gt;&lt;pre&gt;
    // updated for the 0.2.2.0 alpha release
    var ctx = new SharePointDataContext(new Uri(&amp;quot;http://wss.mycompany.local&amp;quot;));
    ctx.Log = Console.Out;
    var users = ctx.GetList&amp;lt;Users&amp;gt;(ctx);
 
    var res = from u in users
              orderby u.Birthdate descending
              where u.FirstName.StartsWith(&amp;quot;B&amp;quot;) &amp;amp;&amp;amp; u.Age &amp;gt;= 24 &amp;amp;&amp;amp; u.FavoriteFood == FavoriteFood.Pizza
              select new { u.FullName, u.Age, Interest = u.AccountBalance * 0.07 };
 
    foreach (var u in res)
        Console.WriteLine(u);
&lt;/pre&gt; &lt;br /&gt;&lt;h3&gt;
Visual Basic sample
&lt;/h3&gt; &lt;br /&gt;&lt;pre&gt;
    ' updated for the 0.2.2.0 alpha release
    Dim context As New SharePointDataContext(New Uri(&amp;quot;http://wss.mycompany.local&amp;quot;))
    context.Log = Console.Out
    Dim users = context.GetList(Of User)()
 
    Dim res = From u In users _
              Order By u.Birthdate Descending _
              Where u.FirstName.StartsWith(&amp;quot;B&amp;quot;) And u.Age &amp;gt;= 24 And u.FavoriteFood.Value = FavoriteFood.Pizza _
              Select u.FullName, u.Age, Interest = u.AccountBalance.Value * 0.07
 
    For Each u In res
        Console.WriteLine(u)
    Next
&lt;/pre&gt; &lt;br /&gt;&lt;h2&gt;
About the project founder
&lt;/h2&gt; &lt;br /&gt;A former Visual C# MVP, &lt;b&gt;Bart De Smet&lt;/b&gt; now works at Microsoft Corporation on the WPF dev team in an SDE role. Prior to this new challenge, Bart was active in the Belgian community evangelizing various Microsoft technologies, most of the time focusing on CLR, language innovation and frameworks. In his evangelism role, he's been speaking at various events and attended several international conferences including TechEd Europe, IT Forum and the PDC. In 2005, Bart graduated as a Master of Informatics from Ghent University, Belgium. Two years later, Bart became a Master of Computer Science Software Engineering from the same university.&lt;br /&gt; &lt;br /&gt;You can visit Bart's blog on &lt;a href="http://blogs.bartdesmet.net/bart" class="externalLink"&gt;http://blogs.bartdesmet.net/bart&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;</description><author>bdesmet</author><pubDate>Thu, 29 Nov 2007 08:37:48 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20071129083748A</guid></item><item><title>UPDATED WIKI: Home</title><link>http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=Home&amp;version=32</link><description>&lt;div class="wikidoc"&gt;
&lt;h2&gt;
Introduction
&lt;/h2&gt; &lt;br /&gt;The LINQ to SharePoint project provides a custom query provider for LINQ that allows to query SharePoint lists using familiar LINQ syntax. LINQ stands for Language Integrated Query and is one of the core features of Microsoft's .NET Framework 3.5 release. More information can be found via the MSDN website on &lt;a href="http://msdn.microsoft.com" class="externalLink"&gt;http://msdn.microsoft.com&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;Visit our &lt;b&gt;team blog&lt;/b&gt; at &lt;a href="http://blogs.bartdesmet.net/LINQtoSharePoint" class="externalLink"&gt;http://blogs.bartdesmet.net/LINQtoSharePoint&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;. Also check out this &lt;b&gt;Channel 9&lt;/b&gt; &lt;a href="http://channel9.msdn.com/ShowPost.aspx?PostID=353173" class="externalLink"&gt;geekSpeak video&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
Features
&lt;/h2&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;Custom query provider that translates LINQ queries to &lt;b&gt;CAML&lt;/b&gt;, the &lt;a href="http://msdn2.microsoft.com/en-us/library/ms462365.aspx" class="externalLink"&gt;Collaborative Application Markup Language&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; used by SharePoint for querying.&lt;/li&gt;&lt;li&gt;Support for LINQ in &lt;b&gt;C# 3.0&lt;/b&gt; and &lt;b&gt;Visual Basic 9.0&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Entity creation tool &lt;b&gt;&lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=SpMetal&amp;amp;referringTitle=Home"&gt;SpMetal&lt;/a&gt;&lt;/b&gt; to export SharePoint list definitions to entity classes used for querying.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Visual Studio 2008 integration&lt;/b&gt; for entity creation (a.k.a. &lt;b&gt;SPML&lt;/b&gt;).&lt;/li&gt;&lt;li&gt;Can connect to a SharePoint site either using the &lt;b&gt;SharePoint object model&lt;/b&gt; or via the &lt;b&gt;SharePoint web services&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Planned support for &lt;b&gt;updating&lt;/b&gt; through entity types.&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
Status
&lt;/h2&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;11/29/2007 - &lt;b&gt;&lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=8713"&gt;v0.2.4.0 alpha release&lt;/a&gt; for .NET Framework 3.5 and Visual Studio 2008 RTM&lt;/b&gt; (&lt;a href="http://community.bartdesmet.net/blogs/linqtosharepoint/archive/2007/11/30/now-available-0-2-4-0-alpha-for-orcas-rtm.aspx" class="externalLink"&gt;release bulletin&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;08/13/2007 - &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=6400"&gt;v0.2.3.0 alpha release&lt;/a&gt; available for Orcas Beta 2 (&lt;a href="http://community.bartdesmet.net/blogs/linqtosharepoint/archive/2007/08/14/alpha-0-2-3-now-available.aspx" class="externalLink"&gt;release bulletin&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;).&lt;/li&gt;&lt;li&gt;08/01/2007 - Sources updated for Orcas Beta 2. A new release targeting Orcas Beta 2 will be provided soon.&lt;/li&gt;&lt;li&gt;07/20/2007 - &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=5973"&gt;v0.2.2.0 alpha release&lt;/a&gt; available for Orcas Beta 1 (&lt;a href="http://community.bartdesmet.net/blogs/linqtosharepoint/archive/2007/07/20/the-0-2-2-alpha-interim-release-an-overview.aspx" class="externalLink"&gt;release bulletin&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;).&lt;/li&gt;&lt;li&gt;07/06/2007 - We're currently working on an interim release that focuses on code maintainability and some design changes to enable the 0.3 update feature set. This interim release will be the first to cover &lt;a href="http://community.bartdesmet.net/blogs/linqtosharepoint/archive/2007/07/04/linq-to-sharepoint-introducing-spml.aspx" class="externalLink"&gt;SPML&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; and Visual Studio 2008 integration with a code generator and an improved debugger visualizer.&lt;/li&gt;&lt;li&gt;06/30/2007 - &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=5390"&gt;v0.2.0.0 alpha release&lt;/a&gt; available for Orcas Beta 1 (&lt;a href="http://community.bartdesmet.net/blogs/linqtosharepoint/archive/2007/07/03/linq-to-sharepoint-alpha-v0-2-available.aspx" class="externalLink"&gt;release bulletin&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;).&lt;/li&gt;&lt;li&gt;06/08/2007 - The 0.2 release is planned to become available later this month; the (draft of the) technical spec is now under source control too (/Specs folder).&lt;/li&gt;&lt;li&gt;05/04/2007 - Work has started on the 0.2 release. The 0.2 release will cover enhanced support for different field types in SharePoint, including Lookup fields, and extended overall test coverage.&lt;/li&gt;&lt;li&gt;04/23/2007 - &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=3637"&gt;v0.1.2.0 alpha release&lt;/a&gt; available for Orcas March 2007 CTP (update for Beta 1 coming soon).&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
Samples
&lt;/h2&gt; &lt;br /&gt;For a list of samples and a quick-start guide, see &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=Samples&amp;amp;referringTitle=Home"&gt;Samples&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
C# sample
&lt;/h3&gt; &lt;br /&gt;&lt;pre&gt;
    // updated for the 0.2.2.0 alpha release
    var ctx = new SharePointDataContext(new Uri(&amp;quot;http://wss.mycompany.local&amp;quot;));
    ctx.Log = Console.Out;
    var users = ctx.GetList&amp;lt;Users&amp;gt;(ctx);
 
    var res = from u in users
              orderby u.Birthdate descending
              where u.FirstName.StartsWith(&amp;quot;B&amp;quot;) &amp;amp;&amp;amp; u.Age &amp;gt;= 24 &amp;amp;&amp;amp; u.FavoriteFood == FavoriteFood.Pizza
              select new { u.FullName, u.Age, Interest = u.AccountBalance * 0.07 };
 
    foreach (var u in res)
        Console.WriteLine(u);
&lt;/pre&gt; &lt;br /&gt;&lt;h3&gt;
Visual Basic sample
&lt;/h3&gt; &lt;br /&gt;&lt;pre&gt;
    ' updated for the 0.2.2.0 alpha release
    Dim context As New SharePointDataContext(New Uri(&amp;quot;http://wss.mycompany.local&amp;quot;))
    context.Log = Console.Out
    Dim users = context.GetList(Of User)()
 
    Dim res = From u In users _
              Order By u.Birthdate Descending _
              Where u.FirstName.StartsWith(&amp;quot;B&amp;quot;) And u.Age &amp;gt;= 24 And u.FavoriteFood.Value = FavoriteFood.Pizza _
              Select u.FullName, u.Age, Interest = u.AccountBalance.Value * 0.07
 
    For Each u In res
        Console.WriteLine(u)
    Next
&lt;/pre&gt; &lt;br /&gt;&lt;h2&gt;
About the project founder
&lt;/h2&gt; &lt;br /&gt;&lt;b&gt;Bart De Smet&lt;/b&gt; is Microsoft MVP for Visual C# and specializes in various Microsoft-related technologies, covering .NET Framework development, CLR, C#, SQL Server and Windows Server System. Since the year 2000, Bart evangelizes Microsoft technologies and delivers presentations on several technology events. Beside his evangelism efforts, he's busy maintaining his blog, writing articles for the local MSDN website in Belgium and doing consultancy for various development projects, spending long and lonely nights with his computer. In 2005, Bart graduated as a Master Informatics from the university of Ghent, Belgium with a summa cum laude degree. Two years later he got a Master of Computer Science (Software Engineering) degree from the same university. For the spare free time that remains, he loves to read technical and scientific books, browse the internet for interesting articles and blog posts, and spend time with friends. Hiking trips, jogging and taking the challenge of playing a game of snooker are the keywords of Bart's limited sports activities.&lt;br /&gt; &lt;br /&gt;You can visit Bart's blog on &lt;a href="http://blogs.bartdesmet.net/bart" class="externalLink"&gt;http://blogs.bartdesmet.net/bart&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;</description><author>bdesmet</author><pubDate>Thu, 29 Nov 2007 08:36:33 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20071129083633A</guid></item><item><title>UPDATED WIKI: Home</title><link>http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=Home&amp;version=31</link><description>&lt;div class="wikidoc"&gt;
&lt;h2&gt;
Introduction
&lt;/h2&gt; &lt;br /&gt;The LINQ to SharePoint project provides a custom query provider for LINQ that allows to query SharePoint lists using familiar LINQ syntax. LINQ stands for Language Integrated Query and is one of the core features of Microsoft's .NET Framework 3.5 release. More information can be found via the MSDN website on &lt;a href="http://msdn.microsoft.com" class="externalLink"&gt;http://msdn.microsoft.com&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;Visit our &lt;b&gt;team blog&lt;/b&gt; at &lt;a href="http://blogs.bartdesmet.net/LINQtoSharePoint" class="externalLink"&gt;http://blogs.bartdesmet.net/LINQtoSharePoint&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;. Also check out this &lt;b&gt;Channel 9&lt;/b&gt; &lt;a href="http://channel9.msdn.com/ShowPost.aspx?PostID=353173" class="externalLink"&gt;geekSpeak video&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
Features
&lt;/h2&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;Custom query provider that translates LINQ queries to &lt;b&gt;CAML&lt;/b&gt;, the &lt;a href="http://msdn2.microsoft.com/en-us/library/ms462365.aspx" class="externalLink"&gt;Collaborative Application Markup Language&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; used by SharePoint for querying.&lt;/li&gt;&lt;li&gt;Support for LINQ in &lt;b&gt;C# 3.0&lt;/b&gt; and &lt;b&gt;Visual Basic 9.0&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Entity creation tool &lt;b&gt;&lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=SpMetal&amp;amp;referringTitle=Home"&gt;SpMetal&lt;/a&gt;&lt;/b&gt; to export SharePoint list definitions to entity classes used for querying.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Visual Studio 2008 integration&lt;/b&gt; for entity creation (a.k.a. &lt;b&gt;SPML&lt;/b&gt;).&lt;/li&gt;&lt;li&gt;Can connect to a SharePoint site either using the &lt;b&gt;SharePoint object model&lt;/b&gt; or via the &lt;b&gt;SharePoint web services&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Planned support for &lt;b&gt;updating&lt;/b&gt; through entity types.&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
Status
&lt;/h2&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;08/13/2007 - &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=6400"&gt;v0.2.3.0 alpha release&lt;/a&gt; available for Orcas Beta 2 (&lt;a href="http://community.bartdesmet.net/blogs/linqtosharepoint/archive/2007/08/14/alpha-0-2-3-now-available.aspx" class="externalLink"&gt;release bulletin&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;).&lt;/li&gt;&lt;li&gt;08/01/2007 - Sources updated for Orcas Beta 2. A new release targeting Orcas Beta 2 will be provided soon.&lt;/li&gt;&lt;li&gt;07/20/2007 - &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=5973"&gt;v0.2.2.0 alpha release&lt;/a&gt; available for Orcas Beta 1 (&lt;a href="http://community.bartdesmet.net/blogs/linqtosharepoint/archive/2007/07/20/the-0-2-2-alpha-interim-release-an-overview.aspx" class="externalLink"&gt;release bulletin&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;).&lt;/li&gt;&lt;li&gt;07/06/2007 - We're currently working on an interim release that focuses on code maintainability and some design changes to enable the 0.3 update feature set. This interim release will be the first to cover &lt;a href="http://community.bartdesmet.net/blogs/linqtosharepoint/archive/2007/07/04/linq-to-sharepoint-introducing-spml.aspx" class="externalLink"&gt;SPML&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; and Visual Studio 2008 integration with a code generator and an improved debugger visualizer.&lt;/li&gt;&lt;li&gt;06/30/2007 - &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=5390"&gt;v0.2.0.0 alpha release&lt;/a&gt; available for Orcas Beta 1 (&lt;a href="http://community.bartdesmet.net/blogs/linqtosharepoint/archive/2007/07/03/linq-to-sharepoint-alpha-v0-2-available.aspx" class="externalLink"&gt;release bulletin&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;).&lt;/li&gt;&lt;li&gt;06/08/2007 - The 0.2 release is planned to become available later this month; the (draft of the) technical spec is now under source control too (/Specs folder).&lt;/li&gt;&lt;li&gt;05/04/2007 - Work has started on the 0.2 release. The 0.2 release will cover enhanced support for different field types in SharePoint, including Lookup fields, and extended overall test coverage.&lt;/li&gt;&lt;li&gt;04/23/2007 - &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=3637"&gt;v0.1.2.0 alpha release&lt;/a&gt; available for Orcas March 2007 CTP (update for Beta 1 coming soon).&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
Samples
&lt;/h2&gt; &lt;br /&gt;For a list of samples and a quick-start guide, see &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=Samples&amp;amp;referringTitle=Home"&gt;Samples&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
C# sample
&lt;/h3&gt; &lt;br /&gt;&lt;pre&gt;
    // updated for the 0.2.2.0 alpha release
    var ctx = new SharePointDataContext(new Uri(&amp;quot;http://wss.mycompany.local&amp;quot;));
    ctx.Log = Console.Out;
    var users = ctx.GetList&amp;lt;Users&amp;gt;(ctx);
 
    var res = from u in users
              orderby u.Birthdate descending
              where u.FirstName.StartsWith(&amp;quot;B&amp;quot;) &amp;amp;&amp;amp; u.Age &amp;gt;= 24 &amp;amp;&amp;amp; u.FavoriteFood == FavoriteFood.Pizza
              select new { u.FullName, u.Age, Interest = u.AccountBalance * 0.07 };
 
    foreach (var u in res)
        Console.WriteLine(u);
&lt;/pre&gt; &lt;br /&gt;&lt;h3&gt;
Visual Basic sample
&lt;/h3&gt; &lt;br /&gt;&lt;pre&gt;
    ' updated for the 0.2.2.0 alpha release
    Dim context As New SharePointDataContext(New Uri(&amp;quot;http://wss.mycompany.local&amp;quot;))
    context.Log = Console.Out
    Dim users = context.GetList(Of User)()
 
    Dim res = From u In users _
              Order By u.Birthdate Descending _
              Where u.FirstName.StartsWith(&amp;quot;B&amp;quot;) And u.Age &amp;gt;= 24 And u.FavoriteFood.Value = FavoriteFood.Pizza _
              Select u.FullName, u.Age, Interest = u.AccountBalance.Value * 0.07
 
    For Each u In res
        Console.WriteLine(u)
    Next
&lt;/pre&gt; &lt;br /&gt;&lt;h2&gt;
About the project founder
&lt;/h2&gt; &lt;br /&gt;&lt;b&gt;Bart De Smet&lt;/b&gt; is Microsoft MVP for Visual C# and specializes in various Microsoft-related technologies, covering .NET Framework development, CLR, C#, SQL Server and Windows Server System. Since the year 2000, Bart evangelizes Microsoft technologies and delivers presentations on several technology events. Beside his evangelism efforts, he's busy maintaining his blog, writing articles for the local MSDN website in Belgium and doing consultancy for various development projects, spending long and lonely nights with his computer. In 2005, Bart graduated as a Master Informatics from the university of Ghent, Belgium with a summa cum laude degree. Two years later he got a Master of Computer Science (Software Engineering) degree from the same university. For the spare free time that remains, he loves to read technical and scientific books, browse the internet for interesting articles and blog posts, and spend time with friends. Hiking trips, jogging and taking the challenge of playing a game of snooker are the keywords of Bart's limited sports activities.&lt;br /&gt; &lt;br /&gt;You can visit Bart's blog on &lt;a href="http://blogs.bartdesmet.net/bart" class="externalLink"&gt;http://blogs.bartdesmet.net/bart&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;</description><author>bdesmet</author><pubDate>Sun, 25 Nov 2007 04:57:19 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20071125045719A</guid></item><item><title>UPDATED WIKI: Home</title><link>http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=Home&amp;version=30</link><description>&lt;div class="wikidoc"&gt;
&lt;h2&gt;
Introduction
&lt;/h2&gt; &lt;br /&gt;The LINQ to SharePoint project provides a custom query provider for LINQ that allows to query SharePoint lists using familiar LINQ syntax. LINQ stands for Language Integrated Query and is one of the core features of Microsoft's .NET Framework 3.5 release. More information can be found via the MSDN website on &lt;a href="http://msdn.microsoft.com" class="externalLink"&gt;http://msdn.microsoft.com&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;Visit our team blog at &lt;a href="http://blogs.bartdesmet.net/LINQtoSharePoint" class="externalLink"&gt;http://blogs.bartdesmet.net/LINQtoSharePoint&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
Features
&lt;/h2&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;Custom query provider that translates LINQ queries to &lt;b&gt;CAML&lt;/b&gt;, the &lt;a href="http://msdn2.microsoft.com/en-us/library/ms462365.aspx" class="externalLink"&gt;Collaborative Application Markup Language&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; used by SharePoint for querying.&lt;/li&gt;&lt;li&gt;Support for LINQ in &lt;b&gt;C# 3.0&lt;/b&gt; and &lt;b&gt;Visual Basic 9.0&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Entity creation tool &lt;b&gt;&lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=SpMetal&amp;amp;referringTitle=Home"&gt;SpMetal&lt;/a&gt;&lt;/b&gt; to export SharePoint list definitions to entity classes used for querying.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Visual Studio 2008 integration&lt;/b&gt; for entity creation (a.k.a. &lt;b&gt;SPML&lt;/b&gt;).&lt;/li&gt;&lt;li&gt;Can connect to a SharePoint site either using the &lt;b&gt;SharePoint object model&lt;/b&gt; or via the &lt;b&gt;SharePoint web services&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Planned support for &lt;b&gt;updating&lt;/b&gt; through entity types.&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
Status
&lt;/h2&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;08/13/2007 - &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=6400"&gt;v0.2.3.0 alpha release&lt;/a&gt; available for Orcas Beta 2 (&lt;a href="http://community.bartdesmet.net/blogs/linqtosharepoint/archive/2007/08/14/alpha-0-2-3-now-available.aspx" class="externalLink"&gt;release bulletin&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;).&lt;/li&gt;&lt;li&gt;08/01/2007 - Sources updated for Orcas Beta 2. A new release targeting Orcas Beta 2 will be provided soon.&lt;/li&gt;&lt;li&gt;07/20/2007 - &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=5973"&gt;v0.2.2.0 alpha release&lt;/a&gt; available for Orcas Beta 1 (&lt;a href="http://community.bartdesmet.net/blogs/linqtosharepoint/archive/2007/07/20/the-0-2-2-alpha-interim-release-an-overview.aspx" class="externalLink"&gt;release bulletin&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;).&lt;/li&gt;&lt;li&gt;07/06/2007 - We're currently working on an interim release that focuses on code maintainability and some design changes to enable the 0.3 update feature set. This interim release will be the first to cover &lt;a href="http://community.bartdesmet.net/blogs/linqtosharepoint/archive/2007/07/04/linq-to-sharepoint-introducing-spml.aspx" class="externalLink"&gt;SPML&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; and Visual Studio 2008 integration with a code generator and an improved debugger visualizer.&lt;/li&gt;&lt;li&gt;06/30/2007 - &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=5390"&gt;v0.2.0.0 alpha release&lt;/a&gt; available for Orcas Beta 1 (&lt;a href="http://community.bartdesmet.net/blogs/linqtosharepoint/archive/2007/07/03/linq-to-sharepoint-alpha-v0-2-available.aspx" class="externalLink"&gt;release bulletin&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;).&lt;/li&gt;&lt;li&gt;06/08/2007 - The 0.2 release is planned to become available later this month; the (draft of the) technical spec is now under source control too (/Specs folder).&lt;/li&gt;&lt;li&gt;05/04/2007 - Work has started on the 0.2 release. The 0.2 release will cover enhanced support for different field types in SharePoint, including Lookup fields, and extended overall test coverage.&lt;/li&gt;&lt;li&gt;04/23/2007 - &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=3637"&gt;v0.1.2.0 alpha release&lt;/a&gt; available for Orcas March 2007 CTP (update for Beta 1 coming soon).&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
Samples
&lt;/h2&gt; &lt;br /&gt;For a list of samples and a quick-start guide, see &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=Samples&amp;amp;referringTitle=Home"&gt;Samples&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
C# sample
&lt;/h3&gt; &lt;br /&gt;&lt;pre&gt;
    // updated for the 0.2.2.0 alpha release
    var ctx = new SharePointDataContext(new Uri(&amp;quot;http://wss.mycompany.local&amp;quot;));
    ctx.Log = Console.Out;
    var users = ctx.GetList&amp;lt;Users&amp;gt;(ctx);
 
    var res = from u in users
              orderby u.Birthdate descending
              where u.FirstName.StartsWith(&amp;quot;B&amp;quot;) &amp;amp;&amp;amp; u.Age &amp;gt;= 24 &amp;amp;&amp;amp; u.FavoriteFood == FavoriteFood.Pizza
              select new { u.FullName, u.Age, Interest = u.AccountBalance * 0.07 };
 
    foreach (var u in res)
        Console.WriteLine(u);
&lt;/pre&gt; &lt;br /&gt;&lt;h3&gt;
Visual Basic sample
&lt;/h3&gt; &lt;br /&gt;&lt;pre&gt;
    ' updated for the 0.2.2.0 alpha release
    Dim context As New SharePointDataContext(New Uri(&amp;quot;http://wss.mycompany.local&amp;quot;))
    context.Log = Console.Out
    Dim users = context.GetList(Of User)()
 
    Dim res = From u In users _
              Order By u.Birthdate Descending _
              Where u.FirstName.StartsWith(&amp;quot;B&amp;quot;) And u.Age &amp;gt;= 24 And u.FavoriteFood.Value = FavoriteFood.Pizza _
              Select u.FullName, u.Age, Interest = u.AccountBalance.Value * 0.07
 
    For Each u In res
        Console.WriteLine(u)
    Next
&lt;/pre&gt; &lt;br /&gt;&lt;h2&gt;
About the project founder
&lt;/h2&gt; &lt;br /&gt;&lt;b&gt;Bart De Smet&lt;/b&gt; is Microsoft MVP for Visual C# and specializes in various Microsoft-related technologies, covering .NET Framework development, CLR, C#, SQL Server and Windows Server System. Since the year 2000, Bart evangelizes Microsoft technologies and delivers presentations on several technology events. Beside his evangelism efforts, he's busy maintaining his blog, writing articles for the local MSDN website in Belgium and doing consultancy for various development projects, spending long and lonely nights with his computer. In 2005, Bart graduated as a Master Informatics from the university of Ghent, Belgium with a summa cum laude degree. Two years later he got a Master of Computer Science (Software Engineering) degree from the same university. For the spare free time that remains, he loves to read technical and scientific books, browse the internet for interesting articles and blog posts, and spend time with friends. Hiking trips, jogging and taking the challenge of playing a game of snooker are the keywords of Bart's limited sports activities.&lt;br /&gt; &lt;br /&gt;You can visit Bart's blog on &lt;a href="http://blogs.bartdesmet.net/bart" class="externalLink"&gt;http://blogs.bartdesmet.net/bart&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;</description><author>bdesmet</author><pubDate>Mon, 13 Aug 2007 20:55:20 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20070813085520P</guid></item><item><title>UPDATED WIKI: Home</title><link>http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=Home&amp;version=29</link><description>&lt;div class="wikidoc"&gt;
&lt;h2&gt;
Introduction
&lt;/h2&gt; &lt;br /&gt;The LINQ to SharePoint project provides a custom query provider for LINQ that allows to query SharePoint lists using familiar LINQ syntax. LINQ stands for Language Integrated Query and is one of the core features of Microsoft's .NET Framework 3.5 release. More information can be found via the MSDN website on &lt;a href="http://msdn.microsoft.com" class="externalLink"&gt;http://msdn.microsoft.com&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;Visit our team blog at &lt;a href="http://blogs.bartdesmet.net/LINQtoSharePoint" class="externalLink"&gt;http://blogs.bartdesmet.net/LINQtoSharePoint&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
Features
&lt;/h2&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;Custom query provider that translates LINQ queries to &lt;b&gt;CAML&lt;/b&gt;, the &lt;a href="http://msdn2.microsoft.com/en-us/library/ms462365.aspx" class="externalLink"&gt;Collaborative Application Markup Language&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; used by SharePoint for querying.&lt;/li&gt;&lt;li&gt;Support for LINQ in &lt;b&gt;C# 3.0&lt;/b&gt; and &lt;b&gt;Visual Basic 9.0&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Entity creation tool &lt;b&gt;&lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=SpMetal&amp;amp;referringTitle=Home"&gt;SpMetal&lt;/a&gt;&lt;/b&gt; to export SharePoint list definitions to entity classes used for querying.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Visual Studio 2008 integration&lt;/b&gt; for entity creation (a.k.a. &lt;b&gt;SPML&lt;/b&gt;).&lt;/li&gt;&lt;li&gt;Can connect to a SharePoint site either using the &lt;b&gt;SharePoint object model&lt;/b&gt; or via the &lt;b&gt;SharePoint web services&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Planned support for &lt;b&gt;updating&lt;/b&gt; through entity types.&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
Status
&lt;/h2&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;08/01/2007 - Sources updated for Orcas Beta 2. A new release targeting Orcas Beta 2 will be provided soon.&lt;/li&gt;&lt;li&gt;07/20/2007 - &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=5973"&gt;v0.2.2.0 alpha release&lt;/a&gt; available for Orcas Beta 1 (&lt;a href="http://community.bartdesmet.net/blogs/linqtosharepoint/archive/2007/07/20/the-0-2-2-alpha-interim-release-an-overview.aspx" class="externalLink"&gt;release bulletin&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;).&lt;/li&gt;&lt;li&gt;07/06/2007 - We're currently working on an interim release that focuses on code maintainability and some design changes to enable the 0.3 update feature set. This interim release will be the first to cover &lt;a href="http://community.bartdesmet.net/blogs/linqtosharepoint/archive/2007/07/04/linq-to-sharepoint-introducing-spml.aspx" class="externalLink"&gt;SPML&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; and Visual Studio 2008 integration with a code generator and an improved debugger visualizer.&lt;/li&gt;&lt;li&gt;06/30/2007 - &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=5390"&gt;v0.2.0.0 alpha release&lt;/a&gt; available for Orcas Beta 1 (&lt;a href="http://community.bartdesmet.net/blogs/linqtosharepoint/archive/2007/07/03/linq-to-sharepoint-alpha-v0-2-available.aspx" class="externalLink"&gt;release bulletin&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;).&lt;/li&gt;&lt;li&gt;06/08/2007 - The 0.2 release is planned to become available later this month; the (draft of the) technical spec is now under source control too (/Specs folder).&lt;/li&gt;&lt;li&gt;05/04/2007 - Work has started on the 0.2 release. The 0.2 release will cover enhanced support for different field types in SharePoint, including Lookup fields, and extended overall test coverage.&lt;/li&gt;&lt;li&gt;04/23/2007 - &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=3637"&gt;v0.1.2.0 alpha release&lt;/a&gt; available for Orcas March 2007 CTP (update for Beta 1 coming soon).&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
Samples
&lt;/h2&gt; &lt;br /&gt;For a list of samples and a quick-start guide, see &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=Samples&amp;amp;referringTitle=Home"&gt;Samples&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
C# sample
&lt;/h3&gt; &lt;br /&gt;&lt;pre&gt;
    // updated for the 0.2.2.0 alpha release
    var ctx = new SharePointDataContext(new Uri(&amp;quot;http://wss.mycompany.local&amp;quot;));
    ctx.Log = Console.Out;
    var users = ctx.GetList&amp;lt;Users&amp;gt;(ctx);
 
    var res = from u in users
              orderby u.Birthdate descending
              where u.FirstName.StartsWith(&amp;quot;B&amp;quot;) &amp;amp;&amp;amp; u.Age &amp;gt;= 24 &amp;amp;&amp;amp; u.FavoriteFood == FavoriteFood.Pizza
              select new { u.FullName, u.Age, Interest = u.AccountBalance * 0.07 };
 
    foreach (var u in res)
        Console.WriteLine(u);
&lt;/pre&gt; &lt;br /&gt;&lt;h3&gt;
Visual Basic sample
&lt;/h3&gt; &lt;br /&gt;&lt;pre&gt;
    ' updated for the 0.2.2.0 alpha release
    Dim context As New SharePointDataContext(New Uri(&amp;quot;http://wss.mycompany.local&amp;quot;))
    context.Log = Console.Out
    Dim users = context.GetList(Of User)()
 
    Dim res = From u In users _
              Order By u.Birthdate Descending _
              Where u.FirstName.StartsWith(&amp;quot;B&amp;quot;) And u.Age &amp;gt;= 24 And u.FavoriteFood.Value = FavoriteFood.Pizza _
              Select u.FullName, u.Age, Interest = u.AccountBalance.Value * 0.07
 
    For Each u In res
        Console.WriteLine(u)
    Next
&lt;/pre&gt; &lt;br /&gt;&lt;h2&gt;
About the project founder
&lt;/h2&gt; &lt;br /&gt;&lt;b&gt;Bart De Smet&lt;/b&gt; is Microsoft MVP for Visual C# and specializes in various Microsoft-related technologies, covering .NET Framework development, CLR, C#, SQL Server and Windows Server System. Since the year 2000, Bart evangelizes Microsoft technologies and delivers presentations on several technology events. Beside his evangelism efforts, he's busy maintaining his blog, writing articles for the local MSDN website in Belgium and doing consultancy for various development projects, spending long and lonely nights with his computer. In 2005, Bart graduated as a Master Informatics from the university of Ghent, Belgium with a summa cum laude degree. Two years later he got a Master of Computer Science (Software Engineering) degree from the same university. For the spare free time that remains, he loves to read technical and scientific books, browse the internet for interesting articles and blog posts, and spend time with friends. Hiking trips, jogging and taking the challenge of playing a game of snooker are the keywords of Bart's limited sports activities.&lt;br /&gt; &lt;br /&gt;You can visit Bart's blog on &lt;a href="http://blogs.bartdesmet.net/bart" class="externalLink"&gt;http://blogs.bartdesmet.net/bart&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;</description><author>bdesmet</author><pubDate>Wed, 01 Aug 2007 20:44:21 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20070801084421P</guid></item><item><title>UPDATED WIKI: Home</title><link>http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=Home&amp;version=28</link><description>&lt;div class="wikidoc"&gt;
&lt;h2&gt;
Introduction
&lt;/h2&gt; &lt;br /&gt;The LINQ to SharePoint project provides a custom query provider for LINQ that allows to query SharePoint lists using familiar LINQ syntax. LINQ stands for Language Integrated Query and is one of the core features of Microsoft's .NET Framework 3.5 release. More information can be found via the MSDN website on &lt;a href="http://msdn.microsoft.com" class="externalLink"&gt;http://msdn.microsoft.com&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;Visit our team blog at &lt;a href="http://blogs.bartdesmet.net/LINQtoSharePoint" class="externalLink"&gt;http://blogs.bartdesmet.net/LINQtoSharePoint&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
Features
&lt;/h2&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;Custom query provider that translates LINQ queries to &lt;b&gt;CAML&lt;/b&gt;, the &lt;a href="http://msdn2.microsoft.com/en-us/library/ms462365.aspx" class="externalLink"&gt;Collaborative Application Markup Language&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; used by SharePoint for querying. In technical terms, the library contains an implementation of IQueryable&amp;lt;T&amp;gt;.&lt;/li&gt;&lt;li&gt;Support for LINQ in &lt;b&gt;C# 3.0&lt;/b&gt; and &lt;b&gt;Visual Basic 9.0&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Entity creation tool &lt;b&gt;&lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=SpMetal&amp;amp;referringTitle=Home"&gt;SpMetal&lt;/a&gt;&lt;/b&gt; to export a SharePoint list definition to a class definition used in querying. This allows to write strongly-typed queries with compile-time type checking.&lt;/li&gt;&lt;li&gt;Can connect to a SharePoint site either using the &lt;b&gt;SharePoint object model&lt;/b&gt; or via the &lt;b&gt;SharePoint web services&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Planned support for &lt;b&gt;updating&lt;/b&gt; through entity types.&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
Status
&lt;/h2&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;07/20/2007 - &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=5973"&gt;v0.2.2.0 alpha release&lt;/a&gt; available for Orcas Beta 1 (&lt;a href="http://community.bartdesmet.net/blogs/linqtosharepoint/archive/2007/07/20/the-0-2-2-alpha-interim-release-an-overview.aspx" class="externalLink"&gt;release bulletin&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;).&lt;/li&gt;&lt;li&gt;07/06/2007 - We're currently working on an interim release that focuses on code maintainability and some design changes to enable the 0.3 update feature set. This interim release will be the first to cover &lt;a href="http://community.bartdesmet.net/blogs/linqtosharepoint/archive/2007/07/04/linq-to-sharepoint-introducing-spml.aspx" class="externalLink"&gt;SPML&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; and Visual Studio 2008 integration with a code generator and an improved debugger visualizer.&lt;/li&gt;&lt;li&gt;06/30/2007 - &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=5390"&gt;v0.2.0.0 alpha release&lt;/a&gt; available for Orcas Beta 1 (&lt;a href="http://community.bartdesmet.net/blogs/linqtosharepoint/archive/2007/07/03/linq-to-sharepoint-alpha-v0-2-available.aspx" class="externalLink"&gt;release bulletin&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;).&lt;/li&gt;&lt;li&gt;06/08/2007 - The 0.2 release is planned to become available later this month; the (draft of the) technical spec is now under source control too (/Specs folder).&lt;/li&gt;&lt;li&gt;05/04/2007 - Work has started on the 0.2 release. The 0.2 release will cover enhanced support for different field types in SharePoint, including Lookup fields, and extended overall test coverage.&lt;/li&gt;&lt;li&gt;04/23/2007 - &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=3637"&gt;v0.1.2.0 alpha release&lt;/a&gt; available for Orcas March 2007 CTP (update for Beta 1 coming soon).&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
Samples
&lt;/h2&gt; &lt;br /&gt;For a list of samples and a quick-start guide, see &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=Samples&amp;amp;referringTitle=Home"&gt;Samples&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
C# sample
&lt;/h3&gt; &lt;br /&gt;&lt;pre&gt;
    // updated for the 0.2.2.0 alpha release
    var ctx = new SharePointDataContext(new Uri(&amp;quot;http://wss.mycompany.local&amp;quot;));
    ctx.Log = Console.Out;
    var users = ctx.GetList&amp;lt;Users&amp;gt;(ctx);
 
    var res = from u in users
              orderby u.Birthdate descending
              where u.FirstName.StartsWith(&amp;quot;B&amp;quot;) &amp;amp;&amp;amp; u.Age &amp;gt;= 24 &amp;amp;&amp;amp; u.FavoriteFood == FavoriteFood.Pizza
              select new { u.FullName, u.Age, Interest = u.AccountBalance * 0.07 };
 
    foreach (var u in res)
        Console.WriteLine(u);
&lt;/pre&gt; &lt;br /&gt;&lt;h3&gt;
Visual Basic sample
&lt;/h3&gt; &lt;br /&gt;&lt;pre&gt;
    ' updated for the 0.2.2.0 alpha release
    Dim context As New SharePointDataContext(New Uri(&amp;quot;http://wss.mycompany.local&amp;quot;))
    context.Log = Console.Out
    Dim users = context.GetList(Of User)()
 
    Dim res = From u In users _
              Order By u.Birthdate Descending _
              Where u.FirstName.StartsWith(&amp;quot;B&amp;quot;) And u.Age &amp;gt;= 24 And u.FavoriteFood.Value = FavoriteFood.Pizza _
              Select u.FullName, u.Age, Interest = u.AccountBalance.Value * 0.07
 
    For Each u In res
        Console.WriteLine(u)
    Next
&lt;/pre&gt; &lt;br /&gt;&lt;h2&gt;
About the project founder
&lt;/h2&gt; &lt;br /&gt;&lt;b&gt;Bart De Smet&lt;/b&gt; is Microsoft MVP for Visual C# and specializes in various Microsoft-related technologies, covering .NET Framework development, CLR, C#, SQL Server and Windows Server System. Since the year 2000, Bart evangelizes Microsoft technologies and delivers presentations on several technology events. Beside his evangelism efforts, he's busy maintaining his blog, writing articles for the local MSDN website in Belgium and doing consultancy for various development projects, spending long and lonely nights with his computer. In 2005, Bart graduated as a Master Informatics from the university of Ghent, Belgium with a summa cum laude degree. Two years later he got a Master of Computer Science (Software Engineering) degree from the same university. For the spare free time that remains, he loves to read technical and scientific books, browse the internet for interesting articles and blog posts, and spend time with friends. Hiking trips, jogging and taking the challenge of playing a game of snooker are the keywords of Bart's limited sports activities.&lt;br /&gt; &lt;br /&gt;You can visit Bart's blog on &lt;a href="http://blogs.bartdesmet.net/bart" class="externalLink"&gt;http://blogs.bartdesmet.net/bart&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;</description><author>bdesmet</author><pubDate>Sun, 29 Jul 2007 00:14:55 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20070729121455A</guid></item><item><title>UPDATED WIKI: Samples</title><link>http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=Samples&amp;version=12</link><description>&lt;div class="wikidoc"&gt;
&lt;b&gt;&lt;u&gt;Note&lt;/u&gt;: This page contains sample code based on the 0.2.0.0 release and earlier. Some samples don't work with the 0.2.2.0 release anymore because of API changes. The samples page will be updated accordingly shortly.&lt;/b&gt;&lt;br /&gt; &lt;br /&gt;&lt;h1&gt;
Samples
&lt;/h1&gt; &lt;br /&gt;This page contains a set of samples that illustrate how to use LINQ to SharePoint.&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
Getting started
&lt;/h2&gt; &lt;br /&gt;In order to take a jumpstart with LINQ to SharePoint, view the &lt;b&gt;Getting started with LINQ to SharePoint video&lt;/b&gt; (&lt;a href="javascript:window.location.href='http://www.codeplex.com/LINQtoSharePoint/Project/FileDownload.aspx?DownloadId=11022';"&gt;C#&lt;/a&gt; - &lt;a href="javascript:window.location.href='http://www.codeplex.com/LINQtoSharePoint/Project/FileDownload.aspx?DownloadId=11023';"&gt;Visual Basic&lt;/a&gt;).&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
General information
&lt;/h3&gt; &lt;br /&gt;Before you start, download binaries and check the machine configuration:&lt;br /&gt;&lt;ol&gt;
&lt;li&gt;Download the &lt;b&gt;LINQ to SharePoint binaries&lt;/b&gt; from CodePlex (see Releases tab). Check for an update regularly.&lt;/li&gt;&lt;li&gt;Download and install the &lt;b&gt;Windows SharePoint Services 3.0 SDK&lt;/b&gt; from &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=05E0DD12-8394-402B-8936-A07FE8AFAFFD&amp;amp;displaylang=en" class="externalLink"&gt;http://www.microsoft.com/downloads/details.aspx?familyid=05E0DD12-8394-402B-8936-A07FE8AFAFFD&amp;amp;displaylang=en&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt; &lt;br /&gt;LINQ to SharePoint is built around the following concepts:&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Entity objects&lt;/b&gt; represent rows from SharePoint lists in a strongly-typed fashion. Entity type definitions can be exported from a SharePoint list definition using the &lt;b&gt;&lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=SPMetal&amp;amp;referringTitle=Samples"&gt;SpMetal&lt;/a&gt;&lt;/b&gt; tool that comes with LINQ to SharePoint.&lt;/li&gt;&lt;li&gt;A SharePoint list is characterized as a &lt;b&gt;&lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=SharePointDataSource&amp;amp;referringTitle=Samples"&gt;SharePointDataSource&amp;lt;T&amp;gt;&lt;/a&gt;&lt;/b&gt; in LINQ to SharePoint, where T is an entity type as explained above.&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;To use LINQ to SharePoint in your .NET 3.5 project:&lt;br /&gt;&lt;ol&gt;
&lt;li&gt;Add a reference to &lt;i&gt;BdsSoft.SharePoint.Linq.dll&lt;/i&gt; and to &lt;i&gt;Microsoft.SharePoint.dll&lt;/i&gt; of the Windows SharePoint Services Object Model.&lt;/li&gt;&lt;li&gt;Drag-and-drop entity type definition files that were generated using &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=SPMetal&amp;amp;referringTitle=Samples"&gt;SpMetal&lt;/a&gt; from Windows Explorer to the project node in Solution Explorer.&lt;/li&gt;&lt;li&gt;Create a &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=SharePointDataSource&amp;amp;referringTitle=Samples"&gt;SharePointDataSource&amp;lt;T&amp;gt;&lt;/a&gt; object to write queries against the SharePoint list. Import the &lt;i&gt;BdsSoft.SharePoint.Linq&lt;/i&gt; namespace to access the &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=SharePointDataSource&amp;amp;referringTitle=Samples"&gt;SharePointDataSource&amp;lt;T&amp;gt;&lt;/a&gt; type.&lt;/li&gt;
&lt;/ol&gt; &lt;br /&gt;&lt;h3&gt;
A first sample
&lt;/h3&gt; &lt;br /&gt;The following piece of C# 3.0 code shows how to write a LINQ query against a SharePoint data source using LINQ to SharePoint:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
using System;
using BdsSoft.SharePoint.Linq;
 
class Program
{
   static void Main()
   {
      var users = new SharePointDataSource&amp;lt;User&amp;gt;(new Uri(&amp;quot;http://www.mysite.com&amp;quot;));
      var res = from u in users
                orderby u.MemberSince descending
                where u.Age &amp;gt;= 24 &amp;amp;&amp;amp; u.FirstName.StartsWith(&amp;quot;B&amp;quot;)
                select new { Name = u.FirstName + &amp;quot; &amp;quot; + u.LastName, u.Age, u.MemberSince };
 
      foreach (var u in res)
         Console.WriteLine(u);
   }
}
&lt;/pre&gt;&lt;b&gt;Tip:&lt;/b&gt; To examine the CAML queries and additional query information at runtime, use the &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=SharePointDataSource&amp;amp;referringTitle=Samples"&gt;SharePointDataSource&amp;lt;T&amp;gt;&lt;/a&gt;'s Log property as shown below:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
      var users = new SharePointDataSource&amp;lt;User&amp;gt;(new Uri(&amp;quot;http://www.mysite.com&amp;quot;));
      users.Log = Console.Out;
 
      var res = from u in users
                ...
&lt;/pre&gt; &lt;br /&gt;&lt;h3&gt;
Under the covers
&lt;/h3&gt; &lt;br /&gt;The CAML query for the sample above looks as follows:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
&amp;lt;Query&amp;gt;
  &amp;lt;Where&amp;gt;
    &amp;lt;And&amp;gt;
      &amp;lt;Geq&amp;gt;
        &amp;lt;Value Type=&amp;quot;Number&amp;quot;&amp;gt;24&amp;lt;/Value&amp;gt;
        &amp;lt;FieldRef Name=&amp;quot;Age&amp;quot; /&amp;gt;
      &amp;lt;/Geq&amp;gt;
      &amp;lt;BeginsWith&amp;gt;
        &amp;lt;FieldRef Name=&amp;quot;First_x0020_name&amp;quot; /&amp;gt;
        &amp;lt;Value Type=&amp;quot;Text&amp;quot;&amp;gt;B&amp;lt;/Value&amp;gt;
      &amp;lt;/BeginsWith&amp;gt;
    &amp;lt;/And&amp;gt;
  &amp;lt;/Where&amp;gt;
  &amp;lt;OrderBy&amp;gt;
    &amp;lt;FieldRef Name=&amp;quot;Member_x0020_since&amp;quot; Ascending=&amp;quot;FALSE&amp;quot; /&amp;gt;
  &amp;lt;/OrderBy&amp;gt;
&amp;lt;/Query&amp;gt;
&amp;lt;ViewFields&amp;gt;
  &amp;lt;FieldRef Name=&amp;quot;First_x0020_name&amp;quot; /&amp;gt;
  &amp;lt;FieldRef Name=&amp;quot;Last_x0020_name&amp;quot; /&amp;gt;
  &amp;lt;FieldRef Name=&amp;quot;Age&amp;quot; /&amp;gt;
  &amp;lt;FieldRef Name=&amp;quot;Member_x0020_since&amp;quot; /&amp;gt;
&amp;lt;/ViewFields&amp;gt;
&lt;/pre&gt;Notice that the projection results in the creation of a &amp;lt;ViewFields&amp;gt; element that restricts the columns returned by the query.&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
Guidelines for writing queries
&lt;/h2&gt; &lt;br /&gt;&lt;h3&gt;
Supported operations
&lt;/h3&gt; &lt;br /&gt;LINQ to SharePoint implements a subset of the &lt;a href="http://msdn2.microsoft.com/en-us/library/ms467521.aspx" class="externalLink"&gt;Query schema of CAML&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;. It supports the following CAML elements:&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;Query&lt;/li&gt;&lt;ul&gt;
&lt;li&gt;Where&lt;/li&gt;&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Logical joins&lt;/b&gt;&lt;/li&gt;&lt;ul&gt;
&lt;li&gt;And&lt;/li&gt;&lt;li&gt;Or&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;Comparison Operators&lt;/b&gt;&lt;/li&gt;&lt;ul&gt;
&lt;li&gt;BeginsWith&lt;/li&gt;&lt;li&gt;Contains&lt;/li&gt;&lt;li&gt;Eq&lt;/li&gt;&lt;li&gt;Neq&lt;/li&gt;&lt;li&gt;Gt&lt;/li&gt;&lt;li&gt;Geq&lt;/li&gt;&lt;li&gt;Lt&lt;/li&gt;&lt;li&gt;Leq&lt;/li&gt;&lt;li&gt;IsNull&lt;/li&gt;&lt;li&gt;IsNotNull&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;&lt;li&gt;OrderBy&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt; &lt;br /&gt;There's no support for the &lt;a href="http://msdn2.microsoft.com/en-us/library/ms436080.aspx" class="externalLink"&gt;DateRangesOverlap&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; and &lt;a href="http://msdn2.microsoft.com/en-us/library/ms415157.aspx" class="externalLink"&gt;GroupBy&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; elements.&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
Writing valid conditions
&lt;/h3&gt; &lt;br /&gt;LINQ to SharePoint requires leaf-level conditions (i.e. conditions without Boolean operators) to written in a fixed format with only one reference to an &lt;b&gt;entity type property&lt;/b&gt;. Valid examples include:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
u.FirstName == &amp;quot;Bart&amp;quot;
u.Age &amp;gt;= 24
1234 &amp;lt; u.AccountBalance
u.FirstName.StartsWith(&amp;quot;B&amp;quot;)
&lt;/pre&gt;It's invalid to have more than one entity property reference in a leaf-level condition, like this:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
u.Age &amp;lt; u.DoubleAge
u.FirstName.Contains(u.NickName)
&lt;/pre&gt;All &lt;b&gt;calculations&lt;/b&gt; should occur on the value side of the condition. The following condition is valid:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
u.Age &amp;lt; 2 * someVariable
&lt;/pre&gt;but the next one isn't valid:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
u.Age / 2 &amp;lt; someVariable
&lt;/pre&gt;&lt;h3&gt;
Inverse order
&lt;/h3&gt; &lt;br /&gt;Conditions in LINQ can be written in reverse order, like this:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
24 &amp;lt;= u.Age
&amp;quot;Bart&amp;quot; == u.Name
true != u.IsMember
&lt;/pre&gt;LINQ to SharePoint will reverse the order of the condition operandi automatically before making the translation to CAML. This is required because CAML conditions always compare the &lt;a href="http://msdn2.microsoft.com/en-us/library/ms442728.aspx" class="externalLink"&gt;FieldRef&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; with the &lt;a href="http://msdn2.microsoft.com/en-us/library/ms441886.aspx" class="externalLink"&gt;Value&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; in that order.&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
String operations
&lt;/h3&gt; &lt;br /&gt;The following methods on System.String are supported in LINQ to SharePoint:&lt;br /&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;&lt;b&gt;StartsWith&lt;/b&gt; (&amp;lt;BeginsWith&amp;gt;...&amp;lt;/BeginsWith&amp;gt;)&lt;/li&gt;&lt;li&gt;&lt;b&gt;Contains&lt;/b&gt; (&amp;lt;Contains&amp;gt;...&amp;lt;/Contains&amp;gt;)&lt;/li&gt;&lt;li&gt;&lt;b&gt;Equals&lt;/b&gt; (&amp;lt;Eq&amp;gt;...&amp;lt;/Eq&amp;gt;)&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;Excessive &lt;b&gt;ToString&lt;/b&gt; calls are stripped off automatically when using == or != comparisons:&lt;br /&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;u.FirstName.ToString().ToString() == &amp;quot;Bart&amp;quot; becomes u.FirstName == &amp;quot;Bart&amp;quot;&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;The entity property reference should always occur on the left-hand side of the condition when using these methods:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
u.FirstName.StartsWith(&amp;quot;B&amp;quot;)
u.LastName.Contains(&amp;quot;Smet&amp;quot;)
u.City.Equals(&amp;quot;Ghent&amp;quot;)
&lt;/pre&gt;The operator overloads &lt;b&gt;==&lt;/b&gt; and &lt;b&gt;!=&lt;/b&gt; are supported too and have an equivalent meaning as Equals or its negation.&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
Nullable types
&lt;/h3&gt; &lt;br /&gt;Entity properties that have been marked as Nullable because it aren't reference types and the field is not defined as required in the SharePoint list definition can be checked for null values in two ways:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
u.Age.HasValue
u.Age != null
&lt;/pre&gt;To reference the value of the nullable property, two approaches exist as well:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
u.Age == 24
u.Age.Value == 24
&lt;/pre&gt;In Visual Basic, the second approach has to be followed, while C# provides more flexibility so that you can drop the .Value property call.&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
Working with Choice and MultiChoice fields
&lt;/h3&gt; &lt;br /&gt;Choice and MultiChoice fields are mapped on enum types by the &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=SPMetal&amp;amp;referringTitle=Samples"&gt;SpMetal&lt;/a&gt; tool. Each &lt;a href="http://msdn2.microsoft.com/en-us/library/ms439235.aspx" class="externalLink"&gt;CHOICE&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; from SharePoint is mapped on a field in the target enumeration, possibly decorated with a &lt;b&gt;ChoiceAttribute&lt;/b&gt; to indicate a different underlying name (for example [Choice(&amp;quot;Laurel &amp;amp; Hardy&amp;quot;)] will be applied on an enum field LaurelHardy). MultiChoice fields (represented by radio buttons in SharePoint) are mapped on a [Flags] enumeration where all values are powers of two to allow bitwise combination. Examples are shown below:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
[Flags]
enum FavoriteFood
{
   Pizza = 1,
   Lasagna = 2,
   Hamburger = 4
}
 
enum MembershipType
{
   Gold,
   Silver,
   Bronze
}
&lt;/pre&gt; &lt;br /&gt;Conditions on &lt;b&gt;Choice fields&lt;/b&gt; should look like this:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
u.MembershipType == MembershipType.Silver
u.MembershipType != MembershipType.Gold
&lt;/pre&gt;and are translated into &amp;lt;Eq&amp;gt; or &amp;lt;Neq&amp;gt; CAML conditions. Comparison operators like &amp;lt;, &amp;lt;=, &amp;gt; and &amp;gt;= won't trigger compilation or runtime errors but shouldn't be used.&lt;br /&gt; &lt;br /&gt;Conditions on &lt;b&gt;MultiChoice fields&lt;/b&gt; should look like this:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
u.FavoriteFood == FavoriteFood.Pizza
u.FavoriteFood != FavoriteFood.Pizza
u.FavoriteFood == (FavoriteFood.Pizza | FavoriteFood.Lasagna)
&lt;/pre&gt;&lt;b&gt;Warning:&lt;/b&gt; There's a semantic mismatch between LINQ queries for MultiChoice fields and what you normally expect in C#.&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;The first condition means that Pizza should be &lt;u&gt;one of&lt;/u&gt; the choices applied for the list item. To that respect, it's equivalent to the &lt;i&gt;(u.FavoriteFood &amp;amp; FavoriteFood.Pizza) == FavoriteFood.Pizza&lt;/i&gt; syntax normally used to check enumeration flags. This syntax isn't supported though.&lt;/li&gt;&lt;li&gt;In a similar fashion, the second condition means that Pizza shouldn't be in the list of favorite foods of the list item; it doesn't restrict any other values though.&lt;/li&gt;&lt;li&gt;The last condition is equivalent to &lt;i&gt;u.FavoriteFood == FavoriteFood.Pizza || u.FavoriteFood == FavoriteFood.Lasagna&lt;/i&gt; but again it doesn't rule out the presence of other choices on the list item.&lt;/li&gt;
&lt;/ul&gt;If you want to use an absolute equality check, it should be written manually. For example, to find people who only like Pizza (and nothing but that), you'd have to write &lt;i&gt;u.FavoriteFood == FavoriteFood.Pizza &amp;amp;&amp;amp; u.FavoriteFood != FavoriteFood.Lasagna &amp;amp;&amp;amp; u.FavoriteFood != FavoriteFood.Hamburger&lt;/i&gt;.&lt;br /&gt; &lt;br /&gt;Fields with &lt;b&gt;fill-in choices&lt;/b&gt; will have an additional mapping field of type string that can be null (no fill-in choice made) or set to some string. This mapping field is cross-linked from the original field using the &lt;b&gt;OtherChoice&lt;/b&gt; property of the &lt;b&gt;FieldAttribute&lt;/b&gt; mapping, like this:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
    /// &amp;lt;summary&amp;gt;
    /// Favorite food
    /// &amp;lt;/summary&amp;gt;
    [Field(&amp;quot;Favorite food&amp;quot;, FieldType.MultiChoice, Id = &amp;quot;c48610a1-098e-438c-9f77-6e65c6a392cb&amp;quot;, OtherChoice = &amp;quot;FavoriteFoodOther&amp;quot;)]
    public FavoriteFood? FavoriteFood { get; set; }
 
    /// &amp;lt;summary&amp;gt;
    /// Favorite food 'Fill-in' value
    /// &amp;lt;/summary&amp;gt;
    [Field(&amp;quot;Favorite food&amp;quot;, FieldType.Text, Id = &amp;quot;c48610a1-098e-438c-9f77-6e65c6a392cb&amp;quot;)]
    public string FavoriteFoodOther { get; set; }
&lt;/pre&gt; &lt;br /&gt;The fill-in choice entity property can used in queries too:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
u.FavoriteFoodOther == &amp;quot;Steak&amp;quot;
u.FavoriteFoodOther != &amp;quot;Steak&amp;quot;
&lt;/pre&gt;Again, the semantic mismatch applies and putting a condition on the fill-in choice doesn't say anything about the possible presence of other choices. Therefore, the first condition will retrieve all the people who like Steak but necessarily &lt;u&gt;only&lt;/u&gt; Steak. The last condition retrieves everyone who doesn't like Steak.&lt;br /&gt; &lt;br /&gt;In the current implementation, the fill-in choice field can also be used to put restrictions on known choice values. For example, you could rewrite &lt;i&gt;u.FavoriteFood == FavoriteFood.Pizza&lt;/i&gt; with &lt;i&gt;u.FavoriteFoodOther == &amp;quot;Pizza&amp;quot;&lt;/i&gt;. To this respect, the 'Other' suffix on fill-in choice fields is a bit of a misnomer. This flexibility allows the list definition to be extended with new CHOICE values, without having to change the code. For example, u.FavoriteFoodOther == &amp;quot;Steak&amp;quot; will keep working even when Steak is added as a recognized pre-defined CHOICE value on the field.&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
Boolean negation
&lt;/h3&gt; &lt;br /&gt;Boolean negation isn't supported directly in CAML, but LINQ to SharePoint knows how to invert most of the supported comparison operators and implements &lt;a href="http://en.wikipedia.org/wiki/De_Morgan's_laws" class="externalLink"&gt;De Morgan's laws&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; to transform Boolean conditions with negations into a negation-less equivalent. A few examples:&lt;br /&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;!(u.Age == 24) becomes u.Age != 24 (&amp;lt;Neq&amp;gt;...&amp;lt;/Neq&amp;gt;)&lt;/li&gt;&lt;li&gt;!(u.Age &amp;lt;= 24) becomes u.Age &amp;gt; 24 (&amp;lt;Lt&amp;gt;...&amp;lt;/Lt&amp;gt;)&lt;/li&gt;&lt;li&gt;!(u.Age &amp;gt; 24 &amp;amp;&amp;amp; u.FirstName == &amp;quot;Bart&amp;quot;) becomes u.Age &amp;lt;= 24 || u.FirstName != &amp;quot;Bart&amp;quot; (&amp;lt;Or&amp;gt;&amp;lt;Leq&amp;gt;...&amp;lt;/Leq&amp;gt;&amp;lt;Neq&amp;gt;...&amp;lt;/Neq&amp;gt;&amp;lt;/Or&amp;gt;)&lt;/li&gt;&lt;li&gt;!(u.Age &amp;gt;= 24 || !(u.FirstName == &amp;quot;Bart&amp;quot; &amp;amp;&amp;amp; u.AccountBalance &amp;lt; 1234)) becomes u.Age &amp;lt; 24 &amp;amp;&amp;amp; (u.FirstName == &amp;quot;Bart&amp;quot; &amp;amp;&amp;amp; u.AccountBalance &amp;lt; 1234) (&amp;lt;And&amp;gt;&amp;lt;Lt&amp;gt;...&amp;lt;/Lt&amp;gt;&amp;lt;And&amp;gt;&amp;lt;Eq&amp;gt;...&amp;lt;/Eq&amp;gt;&amp;lt;Lt&amp;gt;...&amp;lt;/Lt&amp;gt;&amp;lt;/And&amp;gt;&amp;lt;/And&amp;gt;)&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;Negation of the BeginsWith and Contains operators isn't supported though.&lt;br /&gt;
&lt;/div&gt;</description><author>bdesmet</author><pubDate>Fri, 20 Jul 2007 21:10:34 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Samples 20070720091034P</guid></item><item><title>UPDATED WIKI: Home</title><link>http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=Home&amp;version=27</link><description>&lt;div class="wikidoc"&gt;
&lt;h2&gt;
Introduction
&lt;/h2&gt; &lt;br /&gt;The LINQ to SharePoint project provides a custom query provider for LINQ that allows to query SharePoint lists using familiar LINQ syntax. LINQ stands for Language Integrated Query and is one of the core features of Microsoft's .NET Framework 3.5 release. More information can be found via the MSDN website on &lt;a href="http://msdn.microsoft.com" class="externalLink"&gt;http://msdn.microsoft.com&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;Visit our team blog at &lt;a href="http://blogs.bartdesmet.net/LINQtoSharePoint" class="externalLink"&gt;http://blogs.bartdesmet.net/LINQtoSharePoint&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
Features
&lt;/h2&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;Custom query provider that translates LINQ queries to &lt;b&gt;CAML&lt;/b&gt;, the &lt;a href="http://msdn2.microsoft.com/en-us/library/ms462365.aspx" class="externalLink"&gt;Collaborative Application Markup Language&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; used by SharePoint for querying. In technical terms, the library contains an implementation of IQueryable&amp;lt;T&amp;gt;.&lt;/li&gt;&lt;li&gt;Support for LINQ in &lt;b&gt;C# 3.0&lt;/b&gt; and &lt;b&gt;Visual Basic 9.0&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Entity creation tool &lt;b&gt;&lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=SpMetal&amp;amp;referringTitle=Home"&gt;SpMetal&lt;/a&gt;&lt;/b&gt; to export a SharePoint list definition to a class definition used in querying. This allows to write strongly-typed queries with compile-time type checking.&lt;/li&gt;&lt;li&gt;Can connect to a SharePoint site either using the &lt;b&gt;SharePoint object model&lt;/b&gt; or via the &lt;b&gt;SharePoint web services&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Planned support for &lt;b&gt;updating&lt;/b&gt; through entity types.&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
Status
&lt;/h2&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;07/20/2007 - &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=5973"&gt;v0.2.2.0 alpha release&lt;/a&gt; available for Orcas Beta 1 (&lt;a href="http://community.bartdesmet.net/blogs/linqtosharepoint/archive/2007/07/20/the-0-2-2-alpha-interim-release-an-overview.aspx" class="externalLink"&gt;release bulletin&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;).&lt;/li&gt;&lt;li&gt;07/06/2007 - We're currently working on an interim release that focuses on code maintainability and some design changes to enable the 0.3 update feature set. This interim release will be the first to cover &lt;a href="http://community.bartdesmet.net/blogs/linqtosharepoint/archive/2007/07/04/linq-to-sharepoint-introducing-spml.aspx" class="externalLink"&gt;SPML&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; and Visual Studio 2008 integration with a code generator and an improved debugger visualizer.&lt;/li&gt;&lt;li&gt;06/30/2007 - &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=5390"&gt;v0.2.0.0 alpha release&lt;/a&gt; available for Orcas Beta 1 (&lt;a href="http://community.bartdesmet.net/blogs/linqtosharepoint/archive/2007/07/03/linq-to-sharepoint-alpha-v0-2-available.aspx" class="externalLink"&gt;release bulletin&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;).&lt;/li&gt;&lt;li&gt;06/08/2007 - The 0.2 release is planned to become available later this month; the (draft of the) technical spec is now under source control too (/Specs folder).&lt;/li&gt;&lt;li&gt;05/04/2007 - Work has started on the 0.2 release. The 0.2 release will cover enhanced support for different field types in SharePoint, including Lookup fields, and extended overall test coverage.&lt;/li&gt;&lt;li&gt;04/23/2007 - &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=3637"&gt;v0.1.2.0 alpha release&lt;/a&gt; available for Orcas March 2007 CTP (update for Beta 1 coming soon).&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
Samples
&lt;/h2&gt; &lt;br /&gt;For a list of samples and a quick-start guide, see &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=Samples&amp;amp;referringTitle=Home"&gt;Samples&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
C# sample
&lt;/h3&gt; &lt;br /&gt;&lt;pre&gt;
    // updated for the 0.2.2.0 alpha release
    var ctx = new SharePointDataContext(new Uri(&amp;quot;http://wss.mycompany.local&amp;quot;));
    ctx.Log = Console.Out;
    var users = ctx.GetList&amp;lt;Users&amp;gt;(ctx);
 
    var res = from u in users
              orderby u.Birthdate descending
              where u.FirstName.StartsWith(&amp;quot;B&amp;quot;) &amp;amp;&amp;amp; u.Age &amp;gt;= 24 &amp;amp;&amp;amp; u.FavoriteFood == FavoriteFood.Pizza
              select new { u.FullName, u.Age, Interest = u.AccountBalance * 0.07 };
 
    foreach (var u in res)
        Console.WriteLine(u);
&lt;/pre&gt; &lt;br /&gt;&lt;h3&gt;
Visual Basic sample
&lt;/h3&gt; &lt;br /&gt;&lt;pre&gt;
    ' updated for the 0.2.2.0 alpha release
    Dim context As New SharePointDataContext(New Uri(&amp;quot;http://wss.mycompany.local&amp;quot;))
    context.Log = Console.Out
    Dim users = context.GetList(Of User)()
 
    Dim res = From u In users _
              Order By u.Birthdate Descending _
              Where u.FirstName.StartsWith(&amp;quot;B&amp;quot;) And u.Age &amp;gt;= 24 And u.FavoriteFood.Value = FavoriteFood.Pizza _
              Select u.FullName, u.Age, Interest = u.AccountBalance.Value * 0.07
 
    For Each u In res
        Console.WriteLine(u)
    Next
&lt;/pre&gt; &lt;br /&gt;&lt;h2&gt;
About the project founder
&lt;/h2&gt; &lt;br /&gt;&lt;b&gt;Bart De Smet&lt;/b&gt; is Microsoft MVP for Visual C# and specializes in various Microsoft-related technologies, covering .NET Framework development, CLR, C#, SQL Server and Windows Server System. Since the year 2000, Bart evangelizes Microsoft technologies and delivers presentations on several technology events. Beside his evangelism efforts, he's busy maintaining his blog, writing articles for the local MSDN website in Belgium and doing consultancy for various development projects, spending long and lonely nights with his computer. In 2005, Bart graduated as a Master Informatics from the university of Ghent, Belgium with a summa cum laude degree. For the spare free time that remains, he loves to read technical and scientific books, browse the internet for interesting articles and blog posts, and spend time with friends. Hiking trips, jogging and taking the challenge of playing a game of snooker are the keywords of Bart's limited sports activities.&lt;br /&gt; &lt;br /&gt;You can visit Bart's blog on &lt;a href="http://blogs.bartdesmet.net/bart" class="externalLink"&gt;http://blogs.bartdesmet.net/bart&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;</description><author>bdesmet</author><pubDate>Fri, 20 Jul 2007 21:08:09 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20070720090809P</guid></item><item><title>UPDATED WIKI: Home</title><link>http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=Home&amp;version=26</link><description>&lt;div class="wikidoc"&gt;
&lt;h2&gt;
Introduction
&lt;/h2&gt; &lt;br /&gt;The LINQ to SharePoint project provides a custom query provider for LINQ that allows to query SharePoint lists using familiar LINQ syntax. LINQ stands for Language Integrated Query and is one of the core features of Microsoft's .NET Framework 3.5 release. More information can be found via the MSDN website on &lt;a href="http://msdn.microsoft.com" class="externalLink"&gt;http://msdn.microsoft.com&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;Visit our team blog at &lt;a href="http://blogs.bartdesmet.net/LINQtoSharePoint" class="externalLink"&gt;http://blogs.bartdesmet.net/LINQtoSharePoint&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
Features
&lt;/h2&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;Custom query provider that translates LINQ queries to &lt;b&gt;CAML&lt;/b&gt;, the &lt;a href="http://msdn2.microsoft.com/en-us/library/ms462365.aspx" class="externalLink"&gt;Collaborative Application Markup Language&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; used by SharePoint for querying. In technical terms, the library contains an implementation of IQueryable&amp;lt;T&amp;gt;.&lt;/li&gt;&lt;li&gt;Support for LINQ in &lt;b&gt;C# 3.0&lt;/b&gt; and &lt;b&gt;Visual Basic 9.0&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Entity creation tool &lt;b&gt;&lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=SpMetal&amp;amp;referringTitle=Home"&gt;SpMetal&lt;/a&gt;&lt;/b&gt; to export a SharePoint list definition to a class definition used in querying. This allows to write strongly-typed queries with compile-time type checking.&lt;/li&gt;&lt;li&gt;Can connect to a SharePoint site either using the &lt;b&gt;SharePoint object model&lt;/b&gt; or via the &lt;b&gt;SharePoint web services&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Planned support for &lt;b&gt;updating&lt;/b&gt; through entity types.&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
Status
&lt;/h2&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;07/06/2007 - We're currently working on an interim release that focuses on code maintainability and some design changes to enable the 0.3 update feature set. This interim release will be the first to cover &lt;a href="http://community.bartdesmet.net/blogs/linqtosharepoint/archive/2007/07/04/linq-to-sharepoint-introducing-spml.aspx" class="externalLink"&gt;SPML&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; and Visual Studio 2008 integration with a code generator and an improved debugger visualizer.&lt;/li&gt;&lt;li&gt;06/30/2007 - &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=5390"&gt;v0.2.0.0 alpha release&lt;/a&gt; available for Orcas Beta 1 (&lt;a href="http://community.bartdesmet.net/blogs/linqtosharepoint/archive/2007/07/03/linq-to-sharepoint-alpha-v0-2-available.aspx" class="externalLink"&gt;release bulletin&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;).&lt;/li&gt;&lt;li&gt;06/08/2007 - The 0.2 release is planned to become available later this month; the (draft of the) technical spec is now under source control too (/Specs folder).&lt;/li&gt;&lt;li&gt;05/04/2007 - Work has started on the 0.2 release. The 0.2 release will cover enhanced support for different field types in SharePoint, including Lookup fields, and extended overall test coverage.&lt;/li&gt;&lt;li&gt;04/23/2007 - &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=3637"&gt;v0.1.2.0 alpha release&lt;/a&gt; available for Orcas March 2007 CTP (update for Beta 1 coming soon).&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
Samples
&lt;/h2&gt; &lt;br /&gt;For a list of samples and a quick-start guide, see &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=Samples&amp;amp;referringTitle=Home"&gt;Samples&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
C# sample
&lt;/h3&gt; &lt;br /&gt;&lt;pre&gt;
    var users = new SharePointDataSource&amp;lt;User&amp;gt;(new Uri(&amp;quot;http://wss.mycompany.local&amp;quot;));
    users.Log = Console.Out;
 
    var res = from u in users
              orderby u.Birthdate descending
              where u.FirstName.StartsWith(&amp;quot;B&amp;quot;) &amp;amp;&amp;amp; u.Age &amp;gt;= 24 &amp;amp;&amp;amp; u.FavoriteFood == FavoriteFood.Pizza
              select new { u.FullName, u.Age, Interest = u.AccountBalance * 0.07 };
 
    foreach (var u in res)
        Console.WriteLine(u);
&lt;/pre&gt; &lt;br /&gt;&lt;h3&gt;
Visual Basic sample
&lt;/h3&gt; &lt;br /&gt;&lt;pre&gt;
    Dim users As New SharePointDataSource(Of User)(New Uri(&amp;quot;http://wss.mycompany.local&amp;quot;))
    users.Log = Console.Out
 
    Dim res = From u In users _
              Order By u.Birthdate Descending _
              Where u.FirstName.StartsWith(&amp;quot;B&amp;quot;) And u.Age &amp;gt;= 24 And u.FavoriteFood.Value = FavoriteFood.Pizza _
              Select u.FullName, u.Age, Interest = u.AccountBalance.Value * 0.07
 
    For Each u In res
        Console.WriteLine(u)
    Next
&lt;/pre&gt; &lt;br /&gt;&lt;h2&gt;
About the project founder
&lt;/h2&gt; &lt;br /&gt;&lt;b&gt;Bart De Smet&lt;/b&gt; is Microsoft MVP for Visual C# and specializes in various Microsoft-related technologies, covering .NET Framework development, CLR, C#, SQL Server and Windows Server System. Since the year 2000, Bart evangelizes Microsoft technologies and delivers presentations on several technology events. Beside his evangelism efforts, he's busy maintaining his blog, writing articles for the local MSDN website in Belgium and doing consultancy for various development projects, spending long and lonely nights with his computer. In 2005, Bart graduated as a Master Informatics from the university of Ghent, Belgium with a summa cum laude degree. For the spare free time that remains, he loves to read technical and scientific books, browse the internet for interesting articles and blog posts, and spend time with friends. Hiking trips, jogging and taking the challenge of playing a game of snooker are the keywords of Bart's limited sports activities.&lt;br /&gt; &lt;br /&gt;You can visit Bart's blog on &lt;a href="http://blogs.bartdesmet.net/bart" class="externalLink"&gt;http://blogs.bartdesmet.net/bart&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;</description><author>bdesmet</author><pubDate>Fri, 06 Jul 2007 17:02:32 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20070706050232P</guid></item><item><title>UPDATED WIKI: Home</title><link>http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=Home&amp;version=25</link><description>&lt;div class="wikidoc"&gt;
&lt;h2&gt;
Introduction
&lt;/h2&gt; &lt;br /&gt;The LINQ to SharePoint project provides a custom query provider for LINQ that allows to query SharePoint lists using familiar LINQ syntax. LINQ stands for Language Integrated Query and is one of the core features of Microsoft's .NET Framework 3.5 release. More information can be found via the MSDN website on &lt;a href="http://msdn.microsoft.com" class="externalLink"&gt;http://msdn.microsoft.com&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;Visit our team blog at &lt;a href="http://blogs.bartdesmet.net/LINQtoSharePoint" class="externalLink"&gt;http://blogs.bartdesmet.net/LINQtoSharePoint&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
Features
&lt;/h2&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;Custom query provider that translates LINQ queries to &lt;b&gt;CAML&lt;/b&gt;, the &lt;a href="http://msdn2.microsoft.com/en-us/library/ms462365.aspx" class="externalLink"&gt;Collaborative Application Markup Language&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; used by SharePoint for querying. In technical terms, the library contains an implementation of IQueryable&amp;lt;T&amp;gt;.&lt;/li&gt;&lt;li&gt;Support for LINQ in &lt;b&gt;C# 3.0&lt;/b&gt; and &lt;b&gt;Visual Basic 9.0&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Entity creation tool &lt;b&gt;&lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=SpMetal&amp;amp;referringTitle=Home"&gt;SpMetal&lt;/a&gt;&lt;/b&gt; to export a SharePoint list definition to a class definition used in querying. This allows to write strongly-typed queries with compile-time type checking.&lt;/li&gt;&lt;li&gt;Can connect to a SharePoint site either using the &lt;b&gt;SharePoint object model&lt;/b&gt; or via the &lt;b&gt;SharePoint web services&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Planned support for &lt;b&gt;updating&lt;/b&gt; through entity types.&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
Status
&lt;/h2&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;07/06/2007 - We're currently working on an interim release that focuses on code maintainability and some design changes to enable the 0.3 update feature set. This interim release will be the first to cover &lt;a href="http://community.bartdesmet.net/blogs/linqtosharepoint/archive/2007/07/04/linq-to-sharepoint-introducing-spml.aspx" class="externalLink"&gt;SPML&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; and Visual Studio 2008 integration with a code generator and an improved debugger visualizer.&lt;/li&gt;&lt;li&gt;06/30/2007 - &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=5390"&gt;v0.2.0.0 alpha release&lt;/a&gt; available for Orcas Beta 1 (&lt;a href="http://community.bartdesmet.net/blogs/linqtosharepoint/archive/2007/07/03/linq-to-sharepoint-alpha-v0-2-available.aspx" class="externalLink"&gt;release bulletin&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;06/08/2007 - The 0.2 release is planned to become available later this month; the (draft of the) technical spec is now under source control too (/Specs folder).&lt;/li&gt;&lt;li&gt;05/04/2007 - Work has started on the 0.2 release. The 0.2 release will cover enhanced support for different field types in SharePoint, including Lookup fields, and extended overall test coverage.&lt;/li&gt;&lt;li&gt;04/23/2007 - &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=3637"&gt;v0.1.2.0 alpha release&lt;/a&gt; available for Orcas March 2007 CTP (update for Beta 1 coming soon)&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
Samples
&lt;/h2&gt; &lt;br /&gt;For a list of samples and a quick-start guide, see &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=Samples&amp;amp;referringTitle=Home"&gt;Samples&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
C# sample
&lt;/h3&gt; &lt;br /&gt;&lt;pre&gt;
    var users = new SharePointDataSource&amp;lt;User&amp;gt;(new Uri(&amp;quot;http://wss.mycompany.local&amp;quot;));
    users.Log = Console.Out;
 
    var res = from u in users
              orderby u.Birthdate descending
              where u.FirstName.StartsWith(&amp;quot;B&amp;quot;) &amp;amp;&amp;amp; u.Age &amp;gt;= 24 &amp;amp;&amp;amp; u.FavoriteFood == FavoriteFood.Pizza
              select new { u.FullName, u.Age, Interest = u.AccountBalance * 0.07 };
 
    foreach (var u in res)
        Console.WriteLine(u);
&lt;/pre&gt; &lt;br /&gt;&lt;h3&gt;
Visual Basic sample
&lt;/h3&gt; &lt;br /&gt;&lt;pre&gt;
    Dim users As New SharePointDataSource(Of User)(New Uri(&amp;quot;http://wss.mycompany.local&amp;quot;))
    users.Log = Console.Out
 
    Dim res = From u In users _
              Order By u.Birthdate Descending _
              Where u.FirstName.StartsWith(&amp;quot;B&amp;quot;) And u.Age &amp;gt;= 24 And u.FavoriteFood.Value = FavoriteFood.Pizza _
              Select u.FullName, u.Age, Interest = u.AccountBalance.Value * 0.07
 
    For Each u In res
        Console.WriteLine(u)
    Next
&lt;/pre&gt; &lt;br /&gt;&lt;h2&gt;
About the project founder
&lt;/h2&gt; &lt;br /&gt;&lt;b&gt;Bart De Smet&lt;/b&gt; is Microsoft MVP for Visual C# and specializes in various Microsoft-related technologies, covering .NET Framework development, CLR, C#, SQL Server and Windows Server System. Since the year 2000, Bart evangelizes Microsoft technologies and delivers presentations on several technology events. Beside his evangelism efforts, he's busy maintaining his blog, writing articles for the local MSDN website in Belgium and doing consultancy for various development projects, spending long and lonely nights with his computer. In 2005, Bart graduated as a Master Informatics from the university of Ghent, Belgium with a summa cum laude degree. For the spare free time that remains, he loves to read technical and scientific books, browse the internet for interesting articles and blog posts, and spend time with friends. Hiking trips, jogging and taking the challenge of playing a game of snooker are the keywords of Bart's limited sports activities.&lt;br /&gt; &lt;br /&gt;You can visit Bart's blog on &lt;a href="http://blogs.bartdesmet.net/bart" class="externalLink"&gt;http://blogs.bartdesmet.net/bart&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;</description><author>bdesmet</author><pubDate>Fri, 06 Jul 2007 11:55:19 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20070706115519A</guid></item><item><title>UPDATED WIKI: Home</title><link>http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=Home&amp;version=24</link><description>&lt;div class="wikidoc"&gt;
&lt;h2&gt;
Introduction
&lt;/h2&gt; &lt;br /&gt;The LINQ to SharePoint project provides a custom query provider for LINQ that allows to query SharePoint lists using familiar LINQ syntax. LINQ stands for Language Integrated Query and is one of the core features of Microsoft's .NET Framework 3.5 release. More information can be found via the MSDN website on &lt;a href="http://msdn.microsoft.com" class="externalLink"&gt;http://msdn.microsoft.com&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;Visit our team blog at &lt;a href="http://blogs.bartdesmet.net/LINQtoSharePoint" class="externalLink"&gt;http://blogs.bartdesmet.net/LINQtoSharePoint&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
Features
&lt;/h2&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;Custom query provider that translates LINQ queries to &lt;b&gt;CAML&lt;/b&gt;, the [Collaborative Application Markup Language|url:http://msdn2.microsoft.com/en-us/library/ms462365.aspx] used by SharePoint for querying. In technical terms, the library contains an implementation of IQueryable&amp;lt;T&amp;gt;.&lt;/li&gt;&lt;li&gt;Support for LINQ in &lt;b&gt;C# 3.0&lt;/b&gt; and &lt;b&gt;Visual Basic 9.0&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Entity creation tool &lt;b&gt;&lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=SpMetal&amp;amp;referringTitle=Home"&gt;SpMetal&lt;/a&gt;&lt;/b&gt; to export a SharePoint list definition to a class definition used in querying. This allows to write strongly-typed queries with compile-time type checking.&lt;/li&gt;&lt;li&gt;Can connect to a SharePoint site either using the &lt;b&gt;SharePoint object model&lt;/b&gt; or via the &lt;b&gt;SharePoint web services&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Planned support for &lt;b&gt;updating&lt;/b&gt; through entity types.&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
Status
&lt;/h2&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;07/06/2007 - We're currently working on an interim release that focuses on code maintainability and some design changes to enable the 0.3 update feature set. This interim release will be the first to cover &lt;a href="http://community.bartdesmet.net/blogs/linqtosharepoint/archive/2007/07/04/linq-to-sharepoint-introducing-spml.aspx" class="externalLink"&gt;SPML&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; and Visual Studio 2008 integration with a code generator and an improved debugger visualizer.&lt;/li&gt;&lt;li&gt;06/30/2007 - &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=5390"&gt;v0.2.0.0 alpha release&lt;/a&gt; available for Orcas Beta 1 (&lt;a href="http://community.bartdesmet.net/blogs/linqtosharepoint/archive/2007/07/03/linq-to-sharepoint-alpha-v0-2-available.aspx" class="externalLink"&gt;release bulletin&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;06/08/2007 - The 0.2 release is planned to become available later this month; the (draft of the) technical spec is now under source control too (/Specs folder).&lt;/li&gt;&lt;li&gt;05/04/2007 - Work has started on the 0.2 release. The 0.2 release will cover enhanced support for different field types in SharePoint, including Lookup fields, and extended overall test coverage.&lt;/li&gt;&lt;li&gt;04/23/2007 - &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=3637"&gt;v0.1.2.0 alpha release&lt;/a&gt; available for Orcas March 2007 CTP (update for Beta 1 coming soon)&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
Samples
&lt;/h2&gt; &lt;br /&gt;For a list of samples and a quick-start guide, see &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=Samples&amp;amp;referringTitle=Home"&gt;Samples&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
C# sample
&lt;/h3&gt; &lt;br /&gt;&lt;pre&gt;
    var users = new SharePointDataSource&amp;lt;User&amp;gt;(new Uri(&amp;quot;http://wss.mycompany.local&amp;quot;));
    users.Log = Console.Out;
 
    var res = from u in users
              orderby u.Birthdate descending
              where u.FirstName.StartsWith(&amp;quot;B&amp;quot;) &amp;amp;&amp;amp; u.Age &amp;gt;= 24 &amp;amp;&amp;amp; u.FavoriteFood == FavoriteFood.Pizza
              select new { u.FullName, u.Age, Interest = u.AccountBalance * 0.07 };
 
    foreach (var u in res)
        Console.WriteLine(u);
&lt;/pre&gt; &lt;br /&gt;&lt;h3&gt;
Visual Basic sample
&lt;/h3&gt; &lt;br /&gt;&lt;pre&gt;
    Dim users As New SharePointDataSource(Of User)(New Uri(&amp;quot;http://wss.mycompany.local&amp;quot;))
    users.Log = Console.Out
 
    Dim res = From u In users _
              Order By u.Birthdate Descending _
              Where u.FirstName.StartsWith(&amp;quot;B&amp;quot;) And u.Age &amp;gt;= 24 And u.FavoriteFood.Value = FavoriteFood.Pizza _
              Select u.FullName, u.Age, Interest = u.AccountBalance.Value * 0.07
 
    For Each u In res
        Console.WriteLine(u)
    Next
&lt;/pre&gt; &lt;br /&gt;&lt;h2&gt;
About the project founder
&lt;/h2&gt; &lt;br /&gt;&lt;b&gt;Bart De Smet&lt;/b&gt; is Microsoft MVP for Visual C# and specializes in various Microsoft-related technologies, covering .NET Framework development, CLR, C#, SQL Server and Windows Server System. Since the year 2000, Bart evangelizes Microsoft technologies and delivers presentations on several technology events. Beside his evangelism efforts, he's busy maintaining his blog, writing articles for the local MSDN website in Belgium and doing consultancy for various development projects, spending long and lonely nights with his computer. In 2005, Bart graduated as a Master Informatics from the university of Ghent, Belgium with a summa cum laude degree. For the spare free time that remains, he loves to read technical and scientific books, browse the internet for interesting articles and blog posts, and spend time with friends. Hiking trips, jogging and taking the challenge of playing a game of snooker are the keywords of Bart's limited sports activities.&lt;br /&gt; &lt;br /&gt;You can visit Bart's blog on &lt;a href="http://blogs.bartdesmet.net/bart" class="externalLink"&gt;http://blogs.bartdesmet.net/bart&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;</description><author>bdesmet</author><pubDate>Fri, 06 Jul 2007 11:54:52 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20070706115452A</guid></item><item><title>UPDATED WIKI: Home</title><link>http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=Home&amp;version=23</link><description>&lt;div class="wikidoc"&gt;
&lt;h2&gt;
Introduction
&lt;/h2&gt; &lt;br /&gt;The LINQ to SharePoint project provides a custom query provider for LINQ that allows to query SharePoint lists using familiar LINQ syntax. LINQ stands for Language Integrated Query and is one of the core features of Microsoft's .NET Framework 3.5 release. More information can be found via the MSDN website on &lt;a href="http://msdn.microsoft.com" class="externalLink"&gt;http://msdn.microsoft.com&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;Visit our team blog at &lt;a href="http://blogs.bartdesmet.net/LINQtoSharePoint" class="externalLink"&gt;http://blogs.bartdesmet.net/LINQtoSharePoint&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
Features
&lt;/h2&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;Custom query provider that translates LINQ queries to &lt;b&gt;CAML&lt;/b&gt;, the [Collaborative Application Markup Language|url:http://msdn2.microsoft.com/en-us/library/ms462365.aspx] used by SharePoint for querying. In technical terms, the library contains an implementation of IQueryable&amp;lt;T&amp;gt;.&lt;/li&gt;&lt;li&gt;Support for LINQ in &lt;b&gt;C# 3.0&lt;/b&gt; and &lt;b&gt;Visual Basic 9.0&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Entity creation tool &lt;b&gt;&lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=SpMetal&amp;amp;referringTitle=Home"&gt;SpMetal&lt;/a&gt;&lt;/b&gt; to export a SharePoint list definition to a class definition used in querying. This allows to write strongly-typed queries with compile-time type checking.&lt;/li&gt;&lt;li&gt;Can connect to a SharePoint site either using the &lt;b&gt;SharePoint object model&lt;/b&gt; or via the &lt;b&gt;SharePoint web services&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Planned support for &lt;b&gt;updating&lt;/b&gt; through entity types.&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
Status
&lt;/h2&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;07/06/2007 - We're currently working on an interim release that focuses on code maintainability and some design changes to enable the 0.3 update feature set. This interim release will be the first to cover [SPML|url:http://community.bartdesmet.net/blogs/linqtosharepoint/archive/2007/07/04/linq-to-sharepoint-introducing-spml.aspx] and Visual Studio 2008 integration with a code generator and an improved debugger visualizer.&lt;/li&gt;&lt;li&gt;06/30/2007 - &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=5390"&gt;v0.2.0.0 alpha release&lt;/a&gt; available for Orcas Beta 1 (&lt;a href="http://community.bartdesmet.net/blogs/linqtosharepoint/archive/2007/07/03/linq-to-sharepoint-alpha-v0-2-available.aspx" class="externalLink"&gt;release bulletin&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;06/08/2007 - The 0.2 release is planned to become available later this month; the (draft of the) technical spec is now under source control too (/Specs folder).&lt;/li&gt;&lt;li&gt;05/04/2007 - Work has started on the 0.2 release. The 0.2 release will cover enhanced support for different field types in SharePoint, including Lookup fields, and extended overall test coverage.&lt;/li&gt;&lt;li&gt;04/23/2007 - &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=3637"&gt;v0.1.2.0 alpha release&lt;/a&gt; available for Orcas March 2007 CTP (update for Beta 1 coming soon)&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
Samples
&lt;/h2&gt; &lt;br /&gt;For a list of samples and a quick-start guide, see &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=Samples&amp;amp;referringTitle=Home"&gt;Samples&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
C# sample
&lt;/h3&gt; &lt;br /&gt;&lt;pre&gt;
    var users = new SharePointDataSource&amp;lt;User&amp;gt;(new Uri(&amp;quot;http://wss.mycompany.local&amp;quot;));
    users.Log = Console.Out;
 
    var res = from u in users
              orderby u.Birthdate descending
              where u.FirstName.StartsWith(&amp;quot;B&amp;quot;) &amp;amp;&amp;amp; u.Age &amp;gt;= 24 &amp;amp;&amp;amp; u.FavoriteFood == FavoriteFood.Pizza
              select new { u.FullName, u.Age, Interest = u.AccountBalance * 0.07 };
 
    foreach (var u in res)
        Console.WriteLine(u);
&lt;/pre&gt; &lt;br /&gt;&lt;h3&gt;
Visual Basic sample
&lt;/h3&gt; &lt;br /&gt;&lt;pre&gt;
    Dim users As New SharePointDataSource(Of User)(New Uri(&amp;quot;http://wss.mycompany.local&amp;quot;))
    users.Log = Console.Out
 
    Dim res = From u In users _
              Order By u.Birthdate Descending _
              Where u.FirstName.StartsWith(&amp;quot;B&amp;quot;) And u.Age &amp;gt;= 24 And u.FavoriteFood.Value = FavoriteFood.Pizza _
              Select u.FullName, u.Age, Interest = u.AccountBalance.Value * 0.07
 
    For Each u In res
        Console.WriteLine(u)
    Next
&lt;/pre&gt; &lt;br /&gt;&lt;h2&gt;
About the project founder
&lt;/h2&gt; &lt;br /&gt;&lt;b&gt;Bart De Smet&lt;/b&gt; is Microsoft MVP for Visual C# and specializes in various Microsoft-related technologies, covering .NET Framework development, CLR, C#, SQL Server and Windows Server System. Since the year 2000, Bart evangelizes Microsoft technologies and delivers presentations on several technology events. Beside his evangelism efforts, he's busy maintaining his blog, writing articles for the local MSDN website in Belgium and doing consultancy for various development projects, spending long and lonely nights with his computer. In 2005, Bart graduated as a Master Informatics from the university of Ghent, Belgium with a summa cum laude degree. For the spare free time that remains, he loves to read technical and scientific books, browse the internet for interesting articles and blog posts, and spend time with friends. Hiking trips, jogging and taking the challenge of playing a game of snooker are the keywords of Bart's limited sports activities.&lt;br /&gt; &lt;br /&gt;You can visit Bart's blog on &lt;a href="http://blogs.bartdesmet.net/bart" class="externalLink"&gt;http://blogs.bartdesmet.net/bart&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;</description><author>bdesmet</author><pubDate>Fri, 06 Jul 2007 11:49:57 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20070706114957A</guid></item><item><title>UPDATED WIKI: Home</title><link>http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=Home&amp;version=22</link><description>&lt;div class="wikidoc"&gt;
&lt;h2&gt;
Introduction
&lt;/h2&gt; &lt;br /&gt;The LINQ to SharePoint project provides a custom query provider for LINQ that allows to query SharePoint lists using familiar LINQ syntax. LINQ stands for Language Integrated Query and is one of the core features of Microsoft's .NET Framework 3.5 release. More information can be found via the MSDN website on &lt;a href="http://msdn.microsoft.com" class="externalLink"&gt;http://msdn.microsoft.com&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;Visit our team blog at &lt;a href="http://blogs.bartdesmet.net/LINQtoSharePoint" class="externalLink"&gt;http://blogs.bartdesmet.net/LINQtoSharePoint&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
Features
&lt;/h2&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;Custom query provider that translates LINQ queries to &lt;b&gt;CAML&lt;/b&gt;, the [Collaborative Application Markup Language|url:http://msdn2.microsoft.com/en-us/library/ms462365.aspx] used by SharePoint for querying. In technical terms, the library contains an implementation of IQueryable&amp;lt;T&amp;gt;.&lt;/li&gt;&lt;li&gt;Support for LINQ in &lt;b&gt;C# 3.0&lt;/b&gt; and &lt;b&gt;Visual Basic 9.0&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Entity creation tool &lt;b&gt;&lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=SpMetal&amp;amp;referringTitle=Home"&gt;SpMetal&lt;/a&gt;&lt;/b&gt; to export a SharePoint list definition to a class definition used in querying. This allows to write strongly-typed queries with compile-time type checking.&lt;/li&gt;&lt;li&gt;Can connect to a SharePoint site either using the &lt;b&gt;SharePoint object model&lt;/b&gt; or via the &lt;b&gt;SharePoint web services&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Planned support for &lt;b&gt;updating&lt;/b&gt; through entity types.&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
Status
&lt;/h2&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;07/06/2007 - We're currently working on an interim release that focuses on code maintainability and some design changes to enable the 0.3 update feature set. This interim release will be the first to cover [SPML|url:http://community.bartdesmet.net/blogs/linqtosharepoint/archive/2007/07/04/linq-to-sharepoint-introducing-spml.aspx] and Visual Studio 2008 integration with a code generator and an improved debugger visualizer.&lt;/li&gt;&lt;li&gt;06/30/2007 - &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=5390"&gt;v0.2.0.0 alpha release&lt;/a&gt; available for Orcas Beta 1 (&lt;a href="http://community.bartdesmet.net/blogs/linqtosharepoint/archive/2007/07/03/linq-to-sharepoint-alpha-v0-2-available.aspx" class="externalLink"&gt;release bulletin&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;06/08/2007 - The 0.2 release is planned to become available later this month; the (draft of the) technical spec is now under source control too (/Specs folder).&lt;/li&gt;&lt;li&gt;05/04/2007 - Work has started on the 0.2 release; initial check in of sources for Orcas Beta 1 can be found via [Source Code|url:http://www.codeplex.com/LINQtoSharePoint/SourceControl/ListDownloadableCommits.aspx]. The 0.2 release will cover enhanced support for different field types in SharePoint, including Lookup fields, and extended overall test coverage.&lt;/li&gt;&lt;li&gt;04/23/2007 - &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=3637"&gt;v0.1.2.0 alpha release&lt;/a&gt; available for Orcas March 2007 CTP (update for Beta 1 coming soon)&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
Samples
&lt;/h2&gt; &lt;br /&gt;For a list of samples and a quick-start guide, see &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=Samples&amp;amp;referringTitle=Home"&gt;Samples&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
C# sample
&lt;/h3&gt; &lt;br /&gt;&lt;pre&gt;
    var users = new SharePointDataSource&amp;lt;User&amp;gt;(new Uri(&amp;quot;http://wss.mycompany.local&amp;quot;));
    users.Log = Console.Out;
 
    var res = from u in users
              orderby u.Birthdate descending
              where u.FirstName.StartsWith(&amp;quot;B&amp;quot;) &amp;amp;&amp;amp; u.Age &amp;gt;= 24 &amp;amp;&amp;amp; u.FavoriteFood == FavoriteFood.Pizza
              select new { u.FullName, u.Age, Interest = u.AccountBalance * 0.07 };
 
    foreach (var u in res)
        Console.WriteLine(u);
&lt;/pre&gt; &lt;br /&gt;&lt;h3&gt;
Visual Basic sample
&lt;/h3&gt; &lt;br /&gt;&lt;pre&gt;
    Dim users As New SharePointDataSource(Of User)(New Uri(&amp;quot;http://wss.mycompany.local&amp;quot;))
    users.Log = Console.Out
 
    Dim res = From u In users _
              Order By u.Birthdate Descending _
              Where u.FirstName.StartsWith(&amp;quot;B&amp;quot;) And u.Age &amp;gt;= 24 And u.FavoriteFood.Value = FavoriteFood.Pizza _
              Select u.FullName, u.Age, Interest = u.AccountBalance.Value * 0.07
 
    For Each u In res
        Console.WriteLine(u)
    Next
&lt;/pre&gt; &lt;br /&gt;&lt;h2&gt;
About the project founder
&lt;/h2&gt; &lt;br /&gt;&lt;b&gt;Bart De Smet&lt;/b&gt; is Microsoft MVP for Visual C# and specializes in various Microsoft-related technologies, covering .NET Framework development, CLR, C#, SQL Server and Windows Server System. Since the year 2000, Bart evangelizes Microsoft technologies and delivers presentations on several technology events. Beside his evangelism efforts, he's busy maintaining his blog, writing articles for the local MSDN website in Belgium and doing consultancy for various development projects, spending long and lonely nights with his computer. In 2005, Bart graduated as a Master Informatics from the university of Ghent, Belgium with a summa cum laude degree. For the spare free time that remains, he loves to read technical and scientific books, browse the internet for interesting articles and blog posts, and spend time with friends. Hiking trips, jogging and taking the challenge of playing a game of snooker are the keywords of Bart's limited sports activities.&lt;br /&gt; &lt;br /&gt;You can visit Bart's blog on &lt;a href="http://blogs.bartdesmet.net/bart" class="externalLink"&gt;http://blogs.bartdesmet.net/bart&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;</description><author>bdesmet</author><pubDate>Fri, 06 Jul 2007 11:48:40 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20070706114840A</guid></item><item><title>UPDATED WIKI: Home</title><link>http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=Home&amp;version=21</link><description>&lt;div class="wikidoc"&gt;
&lt;h2&gt;
Introduction
&lt;/h2&gt; &lt;br /&gt;The LINQ to SharePoint project provides a custom query provider for LINQ that allows to query SharePoint lists using familiar LINQ syntax. LINQ stands for Language Integrated Query and is one of the core features of Microsoft's .NET Framework 3.5 release. More information can be found via the MSDN website on &lt;a href="http://msdn.microsoft.com" class="externalLink"&gt;http://msdn.microsoft.com&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;Visit our team blog at &lt;a href="http://blogs.bartdesmet.net/LINQtoSharePoint" class="externalLink"&gt;http://blogs.bartdesmet.net/LINQtoSharePoint&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
Features
&lt;/h2&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;Custom query provider that translates LINQ queries to &lt;b&gt;CAML&lt;/b&gt;, the &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=http%3a%2f%2fmsdn2.microsoft.com%2fen-us%2flibrary%2fms462365.aspx&amp;amp;referringTitle=Home"&gt;Collaborative Application Markup Language&lt;/a&gt; used by SharePoint for querying. In technical terms, the library contains an implementation of IQueryable&amp;lt;T&amp;gt;.&lt;/li&gt;&lt;li&gt;Support for LINQ in &lt;b&gt;C# 3.0&lt;/b&gt; and &lt;b&gt;Visual Basic 9.0&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Entity creation tool &lt;b&gt;&lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=SpMetal&amp;amp;referringTitle=Home"&gt;SpMetal&lt;/a&gt;&lt;/b&gt; to export a SharePoint list definition to a class definition used in querying. This allows to write strongly-typed queries with compile-time type checking.&lt;/li&gt;&lt;li&gt;Can connect to a SharePoint site either using the &lt;b&gt;SharePoint object model&lt;/b&gt; or via the &lt;b&gt;SharePoint web services&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Planned support for &lt;b&gt;updating&lt;/b&gt; through entity types.&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
Status
&lt;/h2&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;07/06/2007 - We're currently working on an interim release that focuses on code maintainability and some design changes to enable the 0.3 update feature set. This interim release will be the first to cover &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=http%3a%2f%2fcommunity.bartdesmet.net%2fblogs%2fbart%2farchive%2f2007%2f07%2f01%2flinq-to-sharepoint-introducing-spml.aspx&amp;amp;referringTitle=Home"&gt;SPML&lt;/a&gt; and Visual Studio 2008 integration with a code generator and an improved debugger visualizer.&lt;/li&gt;&lt;li&gt;06/30/2007 - &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=5390"&gt;v0.2.0.0 alpha release&lt;/a&gt; available for Orcas Beta 1&lt;/li&gt;&lt;li&gt;06/08/2007 - The 0.2 release is planned to become available later this month; the (draft of the) technical spec is now under source control too (/Specs folder).&lt;/li&gt;&lt;li&gt;05/04/2007 - Work has started on the 0.2 release; initial check in of sources for Orcas Beta 1 can be found via &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=http%3a%2f%2fwww.codeplex.com%2fLINQtoSharePoint%2fSourceControl%2fListDownloadableCommits.aspx&amp;amp;referringTitle=Home"&gt;Source Code&lt;/a&gt;. The 0.2 release will cover enhanced support for different field types in SharePoint, including Lookup fields, and extended overall test coverage.&lt;/li&gt;&lt;li&gt;04/23/2007 - &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=3637"&gt;v0.1.2.0 alpha release&lt;/a&gt; available for Orcas March 2007 CTP (update for Beta 1 coming soon)&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
Samples
&lt;/h2&gt; &lt;br /&gt;For a list of samples and a quick-start guide, see &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=Samples&amp;amp;referringTitle=Home"&gt;Samples&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
C# sample
&lt;/h3&gt; &lt;br /&gt;&lt;pre&gt;
    var users = new SharePointDataSource&amp;lt;User&amp;gt;(new Uri(&amp;quot;http://wss.mycompany.local&amp;quot;));
    users.Log = Console.Out;
 
    var res = from u in users
              orderby u.Birthdate descending
              where u.FirstName.StartsWith(&amp;quot;B&amp;quot;) &amp;amp;&amp;amp; u.Age &amp;gt;= 24 &amp;amp;&amp;amp; u.FavoriteFood == FavoriteFood.Pizza
              select new { u.FullName, u.Age, Interest = u.AccountBalance * 0.07 };
 
    foreach (var u in res)
        Console.WriteLine(u);
&lt;/pre&gt; &lt;br /&gt;&lt;h3&gt;
Visual Basic sample
&lt;/h3&gt; &lt;br /&gt;&lt;pre&gt;
    Dim users As New SharePointDataSource(Of User)(New Uri(&amp;quot;http://wss.mycompany.local&amp;quot;))
    users.Log = Console.Out
 
    Dim res = From u In users _
              Order By u.Birthdate Descending _
              Where u.FirstName.StartsWith(&amp;quot;B&amp;quot;) And u.Age &amp;gt;= 24 And u.FavoriteFood.Value = FavoriteFood.Pizza _
              Select u.FullName, u.Age, Interest = u.AccountBalance.Value * 0.07
 
    For Each u In res
        Console.WriteLine(u)
    Next
&lt;/pre&gt; &lt;br /&gt;&lt;h2&gt;
Links
&lt;/h2&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;Alpha 0.2.0.0 release bulletin - &lt;a href="http://community.bartdesmet.net/blogs/bart/archive/2007/06/29/linq-to-sharepoint-alpha-v0-2-available.aspx" class="externalLink"&gt;http://community.bartdesmet.net/blogs/bart/archive/2007/06/29/linq-to-sharepoint-alpha-v0-2-available.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Alpha 0.1.2.0 release bulletin - &lt;a href="http://blogs.bartdesmet.net/blogs/bart/archive/2007/04/22/linq-to-sharepoint-0-1-2-0-alpha-release-available-now.aspx" class="externalLink"&gt;http://blogs.bartdesmet.net/blogs/bart/archive/2007/04/22/linq-to-sharepoint-0-1-2-0-alpha-release-available-now.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Announcement - &lt;a href="http://community.bartdesmet.net/blogs/bart/archive/2007/04/13/coming-soon-the-return-of-iqueryable-t-linq-to-sharepoint.aspx" class="externalLink"&gt;http://community.bartdesmet.net/blogs/bart/archive/2007/04/13/coming-soon-the-return-of-iqueryable-t-linq-to-sharepoint.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
About the project founder
&lt;/h2&gt; &lt;br /&gt;&lt;b&gt;Bart De Smet&lt;/b&gt; is Microsoft MVP for Visual C# and specializes in various Microsoft-related technologies, covering .NET Framework development, CLR, C#, SQL Server and Windows Server System. Since the year 2000, Bart evangelizes Microsoft technologies and delivers presentations on several technology events. Beside his evangelism efforts, he's busy maintaining his blog, writing articles for the local MSDN website in Belgium and doing consultancy for various development projects, spending long and lonely nights with his computer. In 2005, Bart graduated as a Master Informatics from the university of Ghent, Belgium with a summa cum laude degree. For the spare free time that remains, he loves to read technical and scientific books, browse the internet for interesting articles and blog posts, and spend time with friends. Hiking trips, jogging and taking the challenge of playing a game of snooker are the keywords of Bart's limited sports activities.&lt;br /&gt; &lt;br /&gt;You can visit Bart's blog on &lt;a href="http://blogs.bartdesmet.net/bart" class="externalLink"&gt;http://blogs.bartdesmet.net/bart&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;</description><author>bdesmet</author><pubDate>Fri, 06 Jul 2007 11:44:49 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20070706114449A</guid></item><item><title>UPDATED WIKI: Home</title><link>http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=Home&amp;version=20</link><description>&lt;div class="wikidoc"&gt;
&lt;h2&gt;
Introduction
&lt;/h2&gt; &lt;br /&gt;The LINQ to SharePoint project provides a custom query provider for LINQ that allows to query SharePoint lists using familiar LINQ syntax. LINQ stands for Language Integrated Query and is one of the core features of Microsoft's .NET Framework 3.5 release. More information can be found via the MSDN website on &lt;a href="http://msdn.microsoft.com" class="externalLink"&gt;http://msdn.microsoft.com&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
Features
&lt;/h2&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;Custom query provider that translates LINQ queries to &lt;b&gt;CAML&lt;/b&gt;, the &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=http%3a%2f%2fmsdn2.microsoft.com%2fen-us%2flibrary%2fms462365.aspx&amp;amp;referringTitle=Home"&gt;Collaborative Application Markup Language&lt;/a&gt; used by SharePoint for querying. In technical terms, the library contains an implementation of IQueryable&amp;lt;T&amp;gt;.&lt;/li&gt;&lt;li&gt;Support for LINQ in &lt;b&gt;C# 3.0&lt;/b&gt; and &lt;b&gt;Visual Basic 9.0&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Entity creation tool &lt;b&gt;&lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=SpMetal&amp;amp;referringTitle=Home"&gt;SpMetal&lt;/a&gt;&lt;/b&gt; to export a SharePoint list definition to a class definition used in querying. This allows to write strongly-typed queries with compile-time type checking.&lt;/li&gt;&lt;li&gt;Can connect to a SharePoint site either using the &lt;b&gt;SharePoint object model&lt;/b&gt; or via the &lt;b&gt;SharePoint web services&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Planned support for &lt;b&gt;updating&lt;/b&gt; through entity types.&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
Status
&lt;/h2&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;07/06/2007 - We're currently working on an interim release that focuses on code maintainability and some design changes to enable the 0.3 update feature set. This interim release will be the first to cover &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=http%3a%2f%2fcommunity.bartdesmet.net%2fblogs%2fbart%2farchive%2f2007%2f07%2f01%2flinq-to-sharepoint-introducing-spml.aspx&amp;amp;referringTitle=Home"&gt;SPML&lt;/a&gt; and Visual Studio 2008 integration with a code generator and an improved debugger visualizer.&lt;/li&gt;&lt;li&gt;06/30/2007 - &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=5390"&gt;v0.2.0.0 alpha release&lt;/a&gt; available for Orcas Beta 1&lt;/li&gt;&lt;li&gt;06/08/2007 - The 0.2 release is planned to become available later this month; the (draft of the) technical spec is now under source control too (/Specs folder).&lt;/li&gt;&lt;li&gt;05/04/2007 - Work has started on the 0.2 release; initial check in of sources for Orcas Beta 1 can be found via &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=http%3a%2f%2fwww.codeplex.com%2fLINQtoSharePoint%2fSourceControl%2fListDownloadableCommits.aspx&amp;amp;referringTitle=Home"&gt;Source Code&lt;/a&gt;. The 0.2 release will cover enhanced support for different field types in SharePoint, including Lookup fields, and extended overall test coverage.&lt;/li&gt;&lt;li&gt;04/23/2007 - &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=3637"&gt;v0.1.2.0 alpha release&lt;/a&gt; available for Orcas March 2007 CTP (update for Beta 1 coming soon)&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
Samples
&lt;/h2&gt; &lt;br /&gt;For a list of samples and a quick-start guide, see &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=Samples&amp;amp;referringTitle=Home"&gt;Samples&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
C# sample
&lt;/h3&gt; &lt;br /&gt;&lt;pre&gt;
    var users = new SharePointDataSource&amp;lt;User&amp;gt;(new Uri(&amp;quot;http://wss.mycompany.local&amp;quot;));
    users.Log = Console.Out;
 
    var res = from u in users
              orderby u.Birthdate descending
              where u.FirstName.StartsWith(&amp;quot;B&amp;quot;) &amp;amp;&amp;amp; u.Age &amp;gt;= 24 &amp;amp;&amp;amp; u.FavoriteFood == FavoriteFood.Pizza
              select new { u.FullName, u.Age, Interest = u.AccountBalance * 0.07 };
 
    foreach (var u in res)
        Console.WriteLine(u);
&lt;/pre&gt; &lt;br /&gt;&lt;h3&gt;
Visual Basic sample
&lt;/h3&gt; &lt;br /&gt;&lt;pre&gt;
    Dim users As New SharePointDataSource(Of User)(New Uri(&amp;quot;http://wss.mycompany.local&amp;quot;))
    users.Log = Console.Out
 
    Dim res = From u In users _
              Order By u.Birthdate Descending _
              Where u.FirstName.StartsWith(&amp;quot;B&amp;quot;) And u.Age &amp;gt;= 24 And u.FavoriteFood.Value = FavoriteFood.Pizza _
              Select u.FullName, u.Age, Interest = u.AccountBalance.Value * 0.07
 
    For Each u In res
        Console.WriteLine(u)
    Next
&lt;/pre&gt; &lt;br /&gt;&lt;h2&gt;
Links
&lt;/h2&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;Alpha 0.2.0.0 release bulletin - &lt;a href="http://community.bartdesmet.net/blogs/bart/archive/2007/06/29/linq-to-sharepoint-alpha-v0-2-available.aspx" class="externalLink"&gt;http://community.bartdesmet.net/blogs/bart/archive/2007/06/29/linq-to-sharepoint-alpha-v0-2-available.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Alpha 0.1.2.0 release bulletin - &lt;a href="http://blogs.bartdesmet.net/blogs/bart/archive/2007/04/22/linq-to-sharepoint-0-1-2-0-alpha-release-available-now.aspx" class="externalLink"&gt;http://blogs.bartdesmet.net/blogs/bart/archive/2007/04/22/linq-to-sharepoint-0-1-2-0-alpha-release-available-now.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Announcement - &lt;a href="http://community.bartdesmet.net/blogs/bart/archive/2007/04/13/coming-soon-the-return-of-iqueryable-t-linq-to-sharepoint.aspx" class="externalLink"&gt;http://community.bartdesmet.net/blogs/bart/archive/2007/04/13/coming-soon-the-return-of-iqueryable-t-linq-to-sharepoint.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
About the project founder
&lt;/h2&gt; &lt;br /&gt;&lt;b&gt;Bart De Smet&lt;/b&gt; is Microsoft MVP for Visual C# and specializes in various Microsoft-related technologies, covering .NET Framework development, CLR, C#, SQL Server and Windows Server System. Since the year 2000, Bart evangelizes Microsoft technologies and delivers presentations on several technology events. Beside his evangelism efforts, he's busy maintaining his blog, writing articles for the local MSDN website in Belgium and doing consultancy for various development projects, spending long and lonely nights with his computer. In 2005, Bart graduated as a Master Informatics from the university of Ghent, Belgium with a summa cum laude degree. For the spare free time that remains, he loves to read technical and scientific books, browse the internet for interesting articles and blog posts, and spend time with friends. Hiking trips, jogging and taking the challenge of playing a game of snooker are the keywords of Bart's limited sports activities.&lt;br /&gt; &lt;br /&gt;You can visit Bart's blog on &lt;a href="http://blogs.bartdesmet.net/bart" class="externalLink"&gt;http://blogs.bartdesmet.net/bart&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;</description><author>bdesmet</author><pubDate>Thu, 05 Jul 2007 22:30:19 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20070705103019P</guid></item><item><title>UPDATED WIKI: Home</title><link>http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=Home&amp;version=19</link><description>&lt;div class="wikidoc"&gt;
&lt;h2&gt;
Introduction
&lt;/h2&gt; &lt;br /&gt;The LINQ to SharePoint project provides a custom query provider for LINQ that allows to query SharePoint lists using familiar LINQ syntax. LINQ stands for Language Integrated Query and is one of the core features of Microsoft's .NET Framework 3.5 release. More information can be found via the MSDN website on &lt;a href="http://msdn.microsoft.com" class="externalLink"&gt;http://msdn.microsoft.com&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
Features
&lt;/h2&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;Custom query provider that translates LINQ queries to &lt;b&gt;CAML&lt;/b&gt;, the &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=http%3a%2f%2fmsdn2.microsoft.com%2fen-us%2flibrary%2fms462365.aspx&amp;amp;referringTitle=Home"&gt;Collaborative Application Markup Language&lt;/a&gt; used by SharePoint for querying. In technical terms, the library contains an implementation of IQueryable&amp;lt;T&amp;gt;.&lt;/li&gt;&lt;li&gt;Support for LINQ in &lt;b&gt;C# 3.0&lt;/b&gt; and &lt;b&gt;Visual Basic 9.0&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Entity creation tool &lt;b&gt;&lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=SpMetal&amp;amp;referringTitle=Home"&gt;SpMetal&lt;/a&gt;&lt;/b&gt; to export a SharePoint list definition to a class definition used in querying. This allows to write strongly-typed queries with compile-time type checking.&lt;/li&gt;&lt;li&gt;Can connect to a SharePoint site either using the &lt;b&gt;SharePoint object model&lt;/b&gt; or via the &lt;b&gt;SharePoint web services&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Planned support for &lt;b&gt;updating&lt;/b&gt; through entity types.&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
Status
&lt;/h2&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;06/30/2007 - &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=5390"&gt;v0.2.0.0 alpha release&lt;/a&gt; available for Orcas Beta 1&lt;/li&gt;&lt;li&gt;06/08/2007 - The 0.2 release is planned to become available later this month; the (draft of the) technical spec is now under source control too (/Specs folder).&lt;/li&gt;&lt;li&gt;05/04/2007 - Work has started on the 0.2 release; initial check in of sources for Orcas Beta 1 can be found via &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=http%3a%2f%2fwww.codeplex.com%2fLINQtoSharePoint%2fSourceControl%2fListDownloadableCommits.aspx&amp;amp;referringTitle=Home"&gt;Source Code&lt;/a&gt;. The 0.2 release will cover enhanced support for different field types in SharePoint, including Lookup fields, and extended overall test coverage.&lt;/li&gt;&lt;li&gt;04/23/2007 - &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Release/ProjectReleases.aspx?ReleaseId=3637"&gt;v0.1.2.0 alpha release&lt;/a&gt; available for Orcas March 2007 CTP (update for Beta 1 coming soon)&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
Samples
&lt;/h2&gt; &lt;br /&gt;For a list of samples and a quick-start guide, see &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=Samples&amp;amp;referringTitle=Home"&gt;Samples&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
C# sample
&lt;/h3&gt; &lt;br /&gt;&lt;pre&gt;
    var users = new SharePointDataSource&amp;lt;User&amp;gt;(new Uri(&amp;quot;http://wss.mycompany.local&amp;quot;));
    users.Log = Console.Out;
 
    var res = from u in users
              orderby u.Birthdate descending
              where u.FirstName.StartsWith(&amp;quot;B&amp;quot;) &amp;amp;&amp;amp; u.Age &amp;gt;= 24 &amp;amp;&amp;amp; u.FavoriteFood == FavoriteFood.Pizza
              select new { u.FullName, u.Age, Interest = u.AccountBalance * 0.07 };
 
    foreach (var u in res)
        Console.WriteLine(u);
&lt;/pre&gt; &lt;br /&gt;&lt;h3&gt;
Visual Basic sample
&lt;/h3&gt; &lt;br /&gt;&lt;pre&gt;
    Dim users As New SharePointDataSource(Of User)(New Uri(&amp;quot;http://wss.mycompany.local&amp;quot;))
    users.Log = Console.Out
 
    Dim res = From u In users _
              Order By u.Birthdate Descending _
              Where u.FirstName.StartsWith(&amp;quot;B&amp;quot;) And u.Age &amp;gt;= 24 And u.FavoriteFood.Value = FavoriteFood.Pizza _
              Select u.FullName, u.Age, Interest = u.AccountBalance.Value * 0.07
 
    For Each u In res
        Console.WriteLine(u)
    Next
&lt;/pre&gt; &lt;br /&gt;&lt;h2&gt;
Links
&lt;/h2&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;Alpha 0.1.2.0 release bulletin - &lt;a href="http://blogs.bartdesmet.net/blogs/bart/archive/2007/04/22/linq-to-sharepoint-0-1-2-0-alpha-release-available-now.aspx" class="externalLink"&gt;http://blogs.bartdesmet.net/blogs/bart/archive/2007/04/22/linq-to-sharepoint-0-1-2-0-alpha-release-available-now.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Announcement - &lt;a href="http://community.bartdesmet.net/blogs/bart/archive/2007/04/13/coming-soon-the-return-of-iqueryable-t-linq-to-sharepoint.aspx" class="externalLink"&gt;http://community.bartdesmet.net/blogs/bart/archive/2007/04/13/coming-soon-the-return-of-iqueryable-t-linq-to-sharepoint.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
About the project founder
&lt;/h2&gt; &lt;br /&gt;&lt;b&gt;Bart De Smet&lt;/b&gt; is Microsoft MVP for Visual C# and specializes in various Microsoft-related technologies, covering .NET Framework development, CLR, C#, SQL Server and Windows Server System. Since the year 2000, Bart evangelizes Microsoft technologies and delivers presentations on several technology events. Beside his evangelism efforts, he's busy maintaining his blog, writing articles for the local MSDN website in Belgium and doing consultancy for various development projects, spending long and lonely nights with his computer. In 2005, Bart graduated as a Master Informatics from the university of Ghent, Belgium with a summa cum laude degree. For the spare free time that remains, he loves to read technical and scientific books, browse the internet for interesting articles and blog posts, and spend time with friends. Hiking trips, jogging and taking the challenge of playing a game of snooker are the keywords of Bart's limited sports activities.&lt;br /&gt; &lt;br /&gt;You can visit Bart's blog on &lt;a href="http://blogs.bartdesmet.net/bart" class="externalLink"&gt;http://blogs.bartdesmet.net/bart&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;</description><author>bdesmet</author><pubDate>Sat, 30 Jun 2007 01:15:24 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20070630011524A</guid></item><item><title>UPDATED WIKI: Samples</title><link>http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=Samples&amp;version=11</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;
Samples
&lt;/h1&gt; &lt;br /&gt;This page contains a set of samples that illustrate how to use LINQ to SharePoint.&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
Getting started
&lt;/h2&gt; &lt;br /&gt;In order to take a jumpstart with LINQ to SharePoint, view the &lt;b&gt;Getting started with LINQ to SharePoint video&lt;/b&gt; (&lt;a href="javascript:window.location.href='http://www.codeplex.com/LINQtoSharePoint/Project/FileDownload.aspx?DownloadId=11022';"&gt;C#&lt;/a&gt; - &lt;a href="javascript:window.location.href='http://www.codeplex.com/LINQtoSharePoint/Project/FileDownload.aspx?DownloadId=11023';"&gt;Visual Basic&lt;/a&gt;).&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
General information
&lt;/h3&gt; &lt;br /&gt;Before you start, download binaries and check the machine configuration:&lt;br /&gt;&lt;ol&gt;
&lt;li&gt;Download the &lt;b&gt;LINQ to SharePoint binaries&lt;/b&gt; from CodePlex (see Releases tab). Check for an update regularly.&lt;/li&gt;&lt;li&gt;Download and install the &lt;b&gt;Windows SharePoint Services 3.0 SDK&lt;/b&gt; from &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=05E0DD12-8394-402B-8936-A07FE8AFAFFD&amp;amp;displaylang=en" class="externalLink"&gt;http://www.microsoft.com/downloads/details.aspx?familyid=05E0DD12-8394-402B-8936-A07FE8AFAFFD&amp;amp;displaylang=en&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt; &lt;br /&gt;LINQ to SharePoint is built around the following concepts:&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Entity objects&lt;/b&gt; represent rows from SharePoint lists in a strongly-typed fashion. Entity type definitions can be exported from a SharePoint list definition using the &lt;b&gt;&lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=SPMetal&amp;amp;referringTitle=Samples"&gt;SpMetal&lt;/a&gt;&lt;/b&gt; tool that comes with LINQ to SharePoint.&lt;/li&gt;&lt;li&gt;A SharePoint list is characterized as a &lt;b&gt;&lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=SharePointDataSource&amp;amp;referringTitle=Samples"&gt;SharePointDataSource&amp;lt;T&amp;gt;&lt;/a&gt;&lt;/b&gt; in LINQ to SharePoint, where T is an entity type as explained above.&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;To use LINQ to SharePoint in your .NET 3.5 project:&lt;br /&gt;&lt;ol&gt;
&lt;li&gt;Add a reference to &lt;i&gt;BdsSoft.SharePoint.Linq.dll&lt;/i&gt; and to &lt;i&gt;Microsoft.SharePoint.dll&lt;/i&gt; of the Windows SharePoint Services Object Model.&lt;/li&gt;&lt;li&gt;Drag-and-drop entity type definition files that were generated using &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=SPMetal&amp;amp;referringTitle=Samples"&gt;SpMetal&lt;/a&gt; from Windows Explorer to the project node in Solution Explorer.&lt;/li&gt;&lt;li&gt;Create a &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=SharePointDataSource&amp;amp;referringTitle=Samples"&gt;SharePointDataSource&amp;lt;T&amp;gt;&lt;/a&gt; object to write queries against the SharePoint list. Import the &lt;i&gt;BdsSoft.SharePoint.Linq&lt;/i&gt; namespace to access the &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=SharePointDataSource&amp;amp;referringTitle=Samples"&gt;SharePointDataSource&amp;lt;T&amp;gt;&lt;/a&gt; type.&lt;/li&gt;
&lt;/ol&gt; &lt;br /&gt;&lt;h3&gt;
A first sample
&lt;/h3&gt; &lt;br /&gt;The following piece of C# 3.0 code shows how to write a LINQ query against a SharePoint data source using LINQ to SharePoint:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
using System;
using BdsSoft.SharePoint.Linq;
 
class Program
{
   static void Main()
   {
      var users = new SharePointDataSource&amp;lt;User&amp;gt;(new Uri(&amp;quot;http://www.mysite.com&amp;quot;));
      var res = from u in users
                orderby u.MemberSince descending
                where u.Age &amp;gt;= 24 &amp;amp;&amp;amp; u.FirstName.StartsWith(&amp;quot;B&amp;quot;)
                select new { Name = u.FirstName + &amp;quot; &amp;quot; + u.LastName, u.Age, u.MemberSince };
 
      foreach (var u in res)
         Console.WriteLine(u);
   }
}
&lt;/pre&gt;&lt;b&gt;Tip:&lt;/b&gt; To examine the CAML queries and additional query information at runtime, use the &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=SharePointDataSource&amp;amp;referringTitle=Samples"&gt;SharePointDataSource&amp;lt;T&amp;gt;&lt;/a&gt;'s Log property as shown below:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
      var users = new SharePointDataSource&amp;lt;User&amp;gt;(new Uri(&amp;quot;http://www.mysite.com&amp;quot;));
      users.Log = Console.Out;
 
      var res = from u in users
                ...
&lt;/pre&gt; &lt;br /&gt;&lt;h3&gt;
Under the covers
&lt;/h3&gt; &lt;br /&gt;The CAML query for the sample above looks as follows:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
&amp;lt;Query&amp;gt;
  &amp;lt;Where&amp;gt;
    &amp;lt;And&amp;gt;
      &amp;lt;Geq&amp;gt;
        &amp;lt;Value Type=&amp;quot;Number&amp;quot;&amp;gt;24&amp;lt;/Value&amp;gt;
        &amp;lt;FieldRef Name=&amp;quot;Age&amp;quot; /&amp;gt;
      &amp;lt;/Geq&amp;gt;
      &amp;lt;BeginsWith&amp;gt;
        &amp;lt;FieldRef Name=&amp;quot;First_x0020_name&amp;quot; /&amp;gt;
        &amp;lt;Value Type=&amp;quot;Text&amp;quot;&amp;gt;B&amp;lt;/Value&amp;gt;
      &amp;lt;/BeginsWith&amp;gt;
    &amp;lt;/And&amp;gt;
  &amp;lt;/Where&amp;gt;
  &amp;lt;OrderBy&amp;gt;
    &amp;lt;FieldRef Name=&amp;quot;Member_x0020_since&amp;quot; Ascending=&amp;quot;FALSE&amp;quot; /&amp;gt;
  &amp;lt;/OrderBy&amp;gt;
&amp;lt;/Query&amp;gt;
&amp;lt;ViewFields&amp;gt;
  &amp;lt;FieldRef Name=&amp;quot;First_x0020_name&amp;quot; /&amp;gt;
  &amp;lt;FieldRef Name=&amp;quot;Last_x0020_name&amp;quot; /&amp;gt;
  &amp;lt;FieldRef Name=&amp;quot;Age&amp;quot; /&amp;gt;
  &amp;lt;FieldRef Name=&amp;quot;Member_x0020_since&amp;quot; /&amp;gt;
&amp;lt;/ViewFields&amp;gt;
&lt;/pre&gt;Notice that the projection results in the creation of a &amp;lt;ViewFields&amp;gt; element that restricts the columns returned by the query.&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
Guidelines for writing queries
&lt;/h2&gt; &lt;br /&gt;&lt;h3&gt;
Supported operations
&lt;/h3&gt; &lt;br /&gt;LINQ to SharePoint implements a subset of the &lt;a href="http://msdn2.microsoft.com/en-us/library/ms467521.aspx" class="externalLink"&gt;Query schema of CAML&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;. It supports the following CAML elements:&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;Query&lt;/li&gt;&lt;ul&gt;
&lt;li&gt;Where&lt;/li&gt;&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Logical joins&lt;/b&gt;&lt;/li&gt;&lt;ul&gt;
&lt;li&gt;And&lt;/li&gt;&lt;li&gt;Or&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;Comparison Operators&lt;/b&gt;&lt;/li&gt;&lt;ul&gt;
&lt;li&gt;BeginsWith&lt;/li&gt;&lt;li&gt;Contains&lt;/li&gt;&lt;li&gt;Eq&lt;/li&gt;&lt;li&gt;Neq&lt;/li&gt;&lt;li&gt;Gt&lt;/li&gt;&lt;li&gt;Geq&lt;/li&gt;&lt;li&gt;Lt&lt;/li&gt;&lt;li&gt;Leq&lt;/li&gt;&lt;li&gt;IsNull&lt;/li&gt;&lt;li&gt;IsNotNull&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;&lt;li&gt;OrderBy&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt; &lt;br /&gt;There's no support for the &lt;a href="http://msdn2.microsoft.com/en-us/library/ms436080.aspx" class="externalLink"&gt;DateRangesOverlap&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; and &lt;a href="http://msdn2.microsoft.com/en-us/library/ms415157.aspx" class="externalLink"&gt;GroupBy&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; elements.&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
Writing valid conditions
&lt;/h3&gt; &lt;br /&gt;LINQ to SharePoint requires leaf-level conditions (i.e. conditions without Boolean operators) to written in a fixed format with only one reference to an &lt;b&gt;entity type property&lt;/b&gt;. Valid examples include:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
u.FirstName == &amp;quot;Bart&amp;quot;
u.Age &amp;gt;= 24
1234 &amp;lt; u.AccountBalance
u.FirstName.StartsWith(&amp;quot;B&amp;quot;)
&lt;/pre&gt;It's invalid to have more than one entity property reference in a leaf-level condition, like this:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
u.Age &amp;lt; u.DoubleAge
u.FirstName.Contains(u.NickName)
&lt;/pre&gt;All &lt;b&gt;calculations&lt;/b&gt; should occur on the value side of the condition. The following condition is valid:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
u.Age &amp;lt; 2 * someVariable
&lt;/pre&gt;but the next one isn't valid:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
u.Age / 2 &amp;lt; someVariable
&lt;/pre&gt;&lt;h3&gt;
Inverse order
&lt;/h3&gt; &lt;br /&gt;Conditions in LINQ can be written in reverse order, like this:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
24 &amp;lt;= u.Age
&amp;quot;Bart&amp;quot; == u.Name
true != u.IsMember
&lt;/pre&gt;LINQ to SharePoint will reverse the order of the condition operandi automatically before making the translation to CAML. This is required because CAML conditions always compare the &lt;a href="http://msdn2.microsoft.com/en-us/library/ms442728.aspx" class="externalLink"&gt;FieldRef&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; with the &lt;a href="http://msdn2.microsoft.com/en-us/library/ms441886.aspx" class="externalLink"&gt;Value&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; in that order.&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
String operations
&lt;/h3&gt; &lt;br /&gt;The following methods on System.String are supported in LINQ to SharePoint:&lt;br /&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;&lt;b&gt;StartsWith&lt;/b&gt; (&amp;lt;BeginsWith&amp;gt;...&amp;lt;/BeginsWith&amp;gt;)&lt;/li&gt;&lt;li&gt;&lt;b&gt;Contains&lt;/b&gt; (&amp;lt;Contains&amp;gt;...&amp;lt;/Contains&amp;gt;)&lt;/li&gt;&lt;li&gt;&lt;b&gt;Equals&lt;/b&gt; (&amp;lt;Eq&amp;gt;...&amp;lt;/Eq&amp;gt;)&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;Excessive &lt;b&gt;ToString&lt;/b&gt; calls are stripped off automatically when using == or != comparisons:&lt;br /&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;u.FirstName.ToString().ToString() == &amp;quot;Bart&amp;quot; becomes u.FirstName == &amp;quot;Bart&amp;quot;&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;The entity property reference should always occur on the left-hand side of the condition when using these methods:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
u.FirstName.StartsWith(&amp;quot;B&amp;quot;)
u.LastName.Contains(&amp;quot;Smet&amp;quot;)
u.City.Equals(&amp;quot;Ghent&amp;quot;)
&lt;/pre&gt;The operator overloads &lt;b&gt;==&lt;/b&gt; and &lt;b&gt;!=&lt;/b&gt; are supported too and have an equivalent meaning as Equals or its negation.&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
Nullable types
&lt;/h3&gt; &lt;br /&gt;Entity properties that have been marked as Nullable because it aren't reference types and the field is not defined as required in the SharePoint list definition can be checked for null values in two ways:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
u.Age.HasValue
u.Age != null
&lt;/pre&gt;To reference the value of the nullable property, two approaches exist as well:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
u.Age == 24
u.Age.Value == 24
&lt;/pre&gt;In Visual Basic, the second approach has to be followed, while C# provides more flexibility so that you can drop the .Value property call.&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
Working with Choice and MultiChoice fields
&lt;/h3&gt; &lt;br /&gt;Choice and MultiChoice fields are mapped on enum types by the &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=SPMetal&amp;amp;referringTitle=Samples"&gt;SpMetal&lt;/a&gt; tool. Each &lt;a href="http://msdn2.microsoft.com/en-us/library/ms439235.aspx" class="externalLink"&gt;CHOICE&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; from SharePoint is mapped on a field in the target enumeration, possibly decorated with a &lt;b&gt;ChoiceAttribute&lt;/b&gt; to indicate a different underlying name (for example [Choice(&amp;quot;Laurel &amp;amp; Hardy&amp;quot;)] will be applied on an enum field LaurelHardy). MultiChoice fields (represented by radio buttons in SharePoint) are mapped on a [Flags] enumeration where all values are powers of two to allow bitwise combination. Examples are shown below:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
[Flags]
enum FavoriteFood
{
   Pizza = 1,
   Lasagna = 2,
   Hamburger = 4
}
 
enum MembershipType
{
   Gold,
   Silver,
   Bronze
}
&lt;/pre&gt; &lt;br /&gt;Conditions on &lt;b&gt;Choice fields&lt;/b&gt; should look like this:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
u.MembershipType == MembershipType.Silver
u.MembershipType != MembershipType.Gold
&lt;/pre&gt;and are translated into &amp;lt;Eq&amp;gt; or &amp;lt;Neq&amp;gt; CAML conditions. Comparison operators like &amp;lt;, &amp;lt;=, &amp;gt; and &amp;gt;= won't trigger compilation or runtime errors but shouldn't be used.&lt;br /&gt; &lt;br /&gt;Conditions on &lt;b&gt;MultiChoice fields&lt;/b&gt; should look like this:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
u.FavoriteFood == FavoriteFood.Pizza
u.FavoriteFood != FavoriteFood.Pizza
u.FavoriteFood == (FavoriteFood.Pizza | FavoriteFood.Lasagna)
&lt;/pre&gt;&lt;b&gt;Warning:&lt;/b&gt; There's a semantic mismatch between LINQ queries for MultiChoice fields and what you normally expect in C#.&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;The first condition means that Pizza should be &lt;u&gt;one of&lt;/u&gt; the choices applied for the list item. To that respect, it's equivalent to the &lt;i&gt;(u.FavoriteFood &amp;amp; FavoriteFood.Pizza) == FavoriteFood.Pizza&lt;/i&gt; syntax normally used to check enumeration flags. This syntax isn't supported though.&lt;/li&gt;&lt;li&gt;In a similar fashion, the second condition means that Pizza shouldn't be in the list of favorite foods of the list item; it doesn't restrict any other values though.&lt;/li&gt;&lt;li&gt;The last condition is equivalent to &lt;i&gt;u.FavoriteFood == FavoriteFood.Pizza || u.FavoriteFood == FavoriteFood.Lasagna&lt;/i&gt; but again it doesn't rule out the presence of other choices on the list item.&lt;/li&gt;
&lt;/ul&gt;If you want to use an absolute equality check, it should be written manually. For example, to find people who only like Pizza (and nothing but that), you'd have to write &lt;i&gt;u.FavoriteFood == FavoriteFood.Pizza &amp;amp;&amp;amp; u.FavoriteFood != FavoriteFood.Lasagna &amp;amp;&amp;amp; u.FavoriteFood != FavoriteFood.Hamburger&lt;/i&gt;.&lt;br /&gt; &lt;br /&gt;Fields with &lt;b&gt;fill-in choices&lt;/b&gt; will have an additional mapping field of type string that can be null (no fill-in choice made) or set to some string. This mapping field is cross-linked from the original field using the &lt;b&gt;OtherChoice&lt;/b&gt; property of the &lt;b&gt;FieldAttribute&lt;/b&gt; mapping, like this:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
    /// &amp;lt;summary&amp;gt;
    /// Favorite food
    /// &amp;lt;/summary&amp;gt;
    [Field(&amp;quot;Favorite food&amp;quot;, FieldType.MultiChoice, Id = &amp;quot;c48610a1-098e-438c-9f77-6e65c6a392cb&amp;quot;, OtherChoice = &amp;quot;FavoriteFoodOther&amp;quot;)]
    public FavoriteFood? FavoriteFood { get; set; }
 
    /// &amp;lt;summary&amp;gt;
    /// Favorite food 'Fill-in' value
    /// &amp;lt;/summary&amp;gt;
    [Field(&amp;quot;Favorite food&amp;quot;, FieldType.Text, Id = &amp;quot;c48610a1-098e-438c-9f77-6e65c6a392cb&amp;quot;)]
    public string FavoriteFoodOther { get; set; }
&lt;/pre&gt; &lt;br /&gt;The fill-in choice entity property can used in queries too:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
u.FavoriteFoodOther == &amp;quot;Steak&amp;quot;
u.FavoriteFoodOther != &amp;quot;Steak&amp;quot;
&lt;/pre&gt;Again, the semantic mismatch applies and putting a condition on the fill-in choice doesn't say anything about the possible presence of other choices. Therefore, the first condition will retrieve all the people who like Steak but necessarily &lt;u&gt;only&lt;/u&gt; Steak. The last condition retrieves everyone who doesn't like Steak.&lt;br /&gt; &lt;br /&gt;In the current implementation, the fill-in choice field can also be used to put restrictions on known choice values. For example, you could rewrite &lt;i&gt;u.FavoriteFood == FavoriteFood.Pizza&lt;/i&gt; with &lt;i&gt;u.FavoriteFoodOther == &amp;quot;Pizza&amp;quot;&lt;/i&gt;. To this respect, the 'Other' suffix on fill-in choice fields is a bit of a misnomer. This flexibility allows the list definition to be extended with new CHOICE values, without having to change the code. For example, u.FavoriteFoodOther == &amp;quot;Steak&amp;quot; will keep working even when Steak is added as a recognized pre-defined CHOICE value on the field.&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
Boolean negation
&lt;/h3&gt; &lt;br /&gt;Boolean negation isn't supported directly in CAML, but LINQ to SharePoint knows how to invert most of the supported comparison operators and implements &lt;a href="http://en.wikipedia.org/wiki/De_Morgan's_laws" class="externalLink"&gt;De Morgan's laws&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; to transform Boolean conditions with negations into a negation-less equivalent. A few examples:&lt;br /&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;!(u.Age == 24) becomes u.Age != 24 (&amp;lt;Neq&amp;gt;...&amp;lt;/Neq&amp;gt;)&lt;/li&gt;&lt;li&gt;!(u.Age &amp;lt;= 24) becomes u.Age &amp;gt; 24 (&amp;lt;Lt&amp;gt;...&amp;lt;/Lt&amp;gt;)&lt;/li&gt;&lt;li&gt;!(u.Age &amp;gt; 24 &amp;amp;&amp;amp; u.FirstName == &amp;quot;Bart&amp;quot;) becomes u.Age &amp;lt;= 24 || u.FirstName != &amp;quot;Bart&amp;quot; (&amp;lt;Or&amp;gt;&amp;lt;Leq&amp;gt;...&amp;lt;/Leq&amp;gt;&amp;lt;Neq&amp;gt;...&amp;lt;/Neq&amp;gt;&amp;lt;/Or&amp;gt;)&lt;/li&gt;&lt;li&gt;!(u.Age &amp;gt;= 24 || !(u.FirstName == &amp;quot;Bart&amp;quot; &amp;amp;&amp;amp; u.AccountBalance &amp;lt; 1234)) becomes u.Age &amp;lt; 24 &amp;amp;&amp;amp; (u.FirstName == &amp;quot;Bart&amp;quot; &amp;amp;&amp;amp; u.AccountBalance &amp;lt; 1234) (&amp;lt;And&amp;gt;&amp;lt;Lt&amp;gt;...&amp;lt;/Lt&amp;gt;&amp;lt;And&amp;gt;&amp;lt;Eq&amp;gt;...&amp;lt;/Eq&amp;gt;&amp;lt;Lt&amp;gt;...&amp;lt;/Lt&amp;gt;&amp;lt;/And&amp;gt;&amp;lt;/And&amp;gt;)&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;Negation of the BeginsWith and Contains operators isn't supported though.&lt;br /&gt;
&lt;/div&gt;</description><author>bdesmet</author><pubDate>Sun, 17 Jun 2007 23:25:31 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Samples 20070617112531P</guid></item><item><title>UPDATED WIKI: Samples</title><link>http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=Samples&amp;version=10</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;
Samples
&lt;/h1&gt; &lt;br /&gt;This page contains a set of samples that illustrate how to use LINQ to SharePoint.&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
Getting started
&lt;/h2&gt; &lt;br /&gt;In order to take a jumpstart with LINQ to SharePoint, view the &lt;b&gt;Getting started with LINQ to SharePoint video&lt;/b&gt; (&lt;a href="javascript:window.location.href='http://www.codeplex.com/LINQtoSharePoint/Project/FileDownload.aspx?DownloadId=11022';"&gt;C#&lt;/a&gt; - &lt;a href="javascript:window.location.href='http://www.codeplex.com/LINQtoSharePoint/Project/FileDownload.aspx?DownloadId=11023';"&gt;Visual Basic&lt;/a&gt;).&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
General information
&lt;/h3&gt; &lt;br /&gt;Before you start, download binaries and check the machine configuration:&lt;br /&gt;&lt;ol&gt;
&lt;li&gt;Download the &lt;b&gt;LINQ to SharePoint binaries&lt;/b&gt; from CodePlex (see Releases tab). Check for an update regularly.&lt;/li&gt;&lt;li&gt;Download and install the &lt;b&gt;Windows SharePoint Services 3.0 SDK&lt;/b&gt; from &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=05E0DD12-8394-402B-8936-A07FE8AFAFFD&amp;amp;displaylang=en" class="externalLink"&gt;http://www.microsoft.com/downloads/details.aspx?familyid=05E0DD12-8394-402B-8936-A07FE8AFAFFD&amp;amp;displaylang=en&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt; &lt;br /&gt;LINQ to SharePoint is built around the following concepts:&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Entity objects&lt;/b&gt; represent rows from SharePoint lists in a strongly-typed fashion. Entity type definitions can be exported from a SharePoint list definition using the &lt;b&gt;&lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=SPMetal&amp;amp;referringTitle=Samples"&gt;SpMetal&lt;/a&gt;&lt;/b&gt; tool that comes with LINQ to SharePoint.&lt;/li&gt;&lt;li&gt;A SharePoint list is characterized as a &lt;b&gt;&lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=SharePointDataSource&amp;amp;referringTitle=Samples"&gt;SharePointDataSource&amp;lt;T&amp;gt;&lt;/a&gt;&lt;/b&gt; in LINQ to SharePoint, where T is an entity type as explained above.&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;To use LINQ to SharePoint in your .NET 3.5 project:&lt;br /&gt;&lt;ol&gt;
&lt;li&gt;Add a reference to &lt;i&gt;BdsSoft.SharePoint.Linq.dll&lt;/i&gt; and to &lt;i&gt;Microsoft.SharePoint.dll&lt;/i&gt; of the Windows SharePoint Services Object Model.&lt;/li&gt;&lt;li&gt;Drag-and-drop entity type definition files that were generated using &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=SPMetal&amp;amp;referringTitle=Samples"&gt;SpMetal&lt;/a&gt; from Windows Explorer to the project node in Solution Explorer.&lt;/li&gt;&lt;li&gt;Create a &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=SharePointDataSource&amp;amp;referringTitle=Samples"&gt;SharePointDataSource&amp;lt;T&amp;gt;&lt;/a&gt; object to write queries against the SharePoint list. Import the &lt;i&gt;BdsSoft.SharePoint.Linq&lt;/i&gt; namespace to access the &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=SharePointDataSource&amp;amp;referringTitle=Samples"&gt;SharePointDataSource&amp;lt;T&amp;gt;&lt;/a&gt; type.&lt;/li&gt;
&lt;/ol&gt; &lt;br /&gt;&lt;h3&gt;
A first sample
&lt;/h3&gt; &lt;br /&gt;The following piece of C# 3.0 code shows how to write a LINQ query against a SharePoint data source using LINQ to SharePoint:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
using System;
using BdsSoft.SharePoint.Linq;
 
class Program
{
   static void Main()
   {
      var users = new SharePointDataSource&amp;lt;User&amp;gt;(new Uri(&amp;quot;http://www.mysite.com&amp;quot;));
      var res = from u in users
                orderby u.MemberSince descending
                where u.Age &amp;gt;= 24 &amp;amp;&amp;amp; u.FirstName.StartsWith(&amp;quot;B&amp;quot;)
                select new { Name = u.FirstName + &amp;quot; &amp;quot; + u.LastName, u.Age, u.MemberSince };
 
      foreach (var u in res)
         Console.WriteLine(u);
   }
}
&lt;/pre&gt;&lt;b&gt;Tip:&lt;/b&gt; To examine the CAML queries and additional query information at runtime, use the &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=SharePointDataSource&amp;amp;referringTitle=Samples"&gt;SharePointDataSource&amp;lt;T&amp;gt;&lt;/a&gt;'s Log property as shown below:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
      var users = new SharePointDataSource&amp;lt;User&amp;gt;(new Uri(&amp;quot;http://www.mysite.com&amp;quot;));
      users.Log = Console.Out;
 
      var res = from u in users
                ...
&lt;/pre&gt; &lt;br /&gt;&lt;h3&gt;
Under the covers
&lt;/h3&gt; &lt;br /&gt;The CAML query for the sample above looks as follows:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
&amp;lt;Query&amp;gt;
  &amp;lt;Where&amp;gt;
    &amp;lt;And&amp;gt;
      &amp;lt;Geq&amp;gt;
        &amp;lt;Value Type=&amp;quot;Number&amp;quot;&amp;gt;24&amp;lt;/Value&amp;gt;
        &amp;lt;FieldRef Name=&amp;quot;Age&amp;quot; /&amp;gt;
      &amp;lt;/Geq&amp;gt;
      &amp;lt;BeginsWith&amp;gt;
        &amp;lt;FieldRef Name=&amp;quot;First_x0020_name&amp;quot; /&amp;gt;
        &amp;lt;Value Type=&amp;quot;Text&amp;quot;&amp;gt;B&amp;lt;/Value&amp;gt;
      &amp;lt;/BeginsWith&amp;gt;
    &amp;lt;/And&amp;gt;
  &amp;lt;/Where&amp;gt;
  &amp;lt;OrderBy&amp;gt;
    &amp;lt;FieldRef Name=&amp;quot;Member_x0020_since&amp;quot; Ascending=&amp;quot;FALSE&amp;quot; /&amp;gt;
  &amp;lt;/OrderBy&amp;gt;
&amp;lt;/Query&amp;gt;
&amp;lt;ViewFields&amp;gt;
  &amp;lt;FieldRef Name=&amp;quot;First_x0020_name&amp;quot; /&amp;gt;
  &amp;lt;FieldRef Name=&amp;quot;Last_x0020_name&amp;quot; /&amp;gt;
  &amp;lt;FieldRef Name=&amp;quot;Age&amp;quot; /&amp;gt;
  &amp;lt;FieldRef Name=&amp;quot;Member_x0020_since&amp;quot; /&amp;gt;
&amp;lt;/ViewFields&amp;gt;
&lt;/pre&gt;Notice that the projection results in the creation of a &amp;lt;ViewFields&amp;gt; element that restricts the columns returned by the query.&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
Guidelines for writing queries
&lt;/h2&gt; &lt;br /&gt;&lt;h3&gt;
Supported operations
&lt;/h3&gt; &lt;br /&gt;LINQ to SharePoint implements a subset of the &lt;a href="http://msdn2.microsoft.com/en-us/library/ms467521.aspx" class="externalLink"&gt;Query schema of CAML&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;. It supports the following CAML elements:&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;Query&lt;/li&gt;&lt;ul&gt;
&lt;li&gt;Where&lt;/li&gt;&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Logical joins&lt;/b&gt;&lt;/li&gt;&lt;ul&gt;
&lt;li&gt;And&lt;/li&gt;&lt;li&gt;Or&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;Comparison Operators&lt;/b&gt;&lt;/li&gt;&lt;ul&gt;
&lt;li&gt;BeginsWith&lt;/li&gt;&lt;li&gt;Contains&lt;/li&gt;&lt;li&gt;Eq&lt;/li&gt;&lt;li&gt;Neq&lt;/li&gt;&lt;li&gt;Gt&lt;/li&gt;&lt;li&gt;Geq&lt;/li&gt;&lt;li&gt;Lt&lt;/li&gt;&lt;li&gt;Leq&lt;/li&gt;&lt;li&gt;IsNull&lt;/li&gt;&lt;li&gt;IsNotNull&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;&lt;li&gt;OrderBy&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt; &lt;br /&gt;There's no support for the &lt;a href="http://msdn2.microsoft.com/en-us/library/ms436080.aspx" class="externalLink"&gt;DateRangesOverlap&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; and &lt;a href="http://msdn2.microsoft.com/en-us/library/ms415157.aspx" class="externalLink"&gt;GroupBy&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; elements.&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
Writing valid conditions
&lt;/h3&gt; &lt;br /&gt;LINQ to SharePoint requires leaf-level conditions (i.e. conditions without Boolean operators) to written in a fixed format with only one reference to an &lt;b&gt;entity type property&lt;/b&gt;. Valid examples include:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
u.FirstName == &amp;quot;Bart&amp;quot;
u.Age &amp;gt;= 24
1234 &amp;lt; u.AccountBalance
u.FirstName.StartsWith(&amp;quot;B&amp;quot;)
&lt;/pre&gt;It's invalid to have more than one entity property reference in a leaf-level condition, like this:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
u.Age &amp;lt; u.DoubleAge
u.FirstName.Contains(u.NickName)
&lt;/pre&gt;All &lt;b&gt;calculations&lt;/b&gt; should occur on the value side of the condition. The following condition is valid:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
u.Age &amp;lt; 2 * someVariable
&lt;/pre&gt;but the next one isn't valid:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
u.Age / 2 &amp;lt; someVariable
&lt;/pre&gt;&lt;h3&gt;
Inverse order
&lt;/h3&gt; &lt;br /&gt;Conditions in LINQ can be written in reverse order, like this:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
24 &amp;lt;= u.Age
&amp;quot;Bart&amp;quot; == u.Name
true != u.IsMember
&lt;/pre&gt;LINQ to SharePoint will reverse the order of the condition operandi automatically before making the translation to CAML. This is required because CAML conditions always compare the &lt;a href="http://msdn2.microsoft.com/en-us/library/ms442728.aspx" class="externalLink"&gt;FieldRef&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; with the &lt;a href="http://msdn2.microsoft.com/en-us/library/ms441886.aspx" class="externalLink"&gt;Value&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; in that order.&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
String operations
&lt;/h3&gt; &lt;br /&gt;The following methods on System.String are supported in LINQ to SharePoint:&lt;br /&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;&lt;b&gt;StartsWith&lt;/b&gt; (&amp;lt;BeginsWith&amp;gt;...&amp;lt;/BeginsWith&amp;gt;)&lt;/li&gt;&lt;li&gt;&lt;b&gt;Contains&lt;/b&gt; (&amp;lt;Contains&amp;gt;...&amp;lt;/Contains&amp;gt;)&lt;/li&gt;&lt;li&gt;&lt;b&gt;Equals&lt;/b&gt; (&amp;lt;Eq&amp;gt;...&amp;lt;/Eq&amp;gt;)&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;Excessive &lt;b&gt;ToString&lt;/b&gt; calls are stripped off automatically when using == or != comparisons:&lt;br /&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;u.FirstName.ToString().ToString() == &amp;quot;Bart&amp;quot; becomes u.FirstName == &amp;quot;Bart&amp;quot;&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;The entity property reference should always occur on the left-hand side of the condition when using these methods:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
u.FirstName.StartsWith(&amp;quot;B&amp;quot;)
u.LastName.Contains(&amp;quot;Smet&amp;quot;)
u.City.Equals(&amp;quot;Ghent&amp;quot;)
&lt;/pre&gt;The operator overloads &lt;b&gt;==&lt;/b&gt; and &lt;b&gt;!=&lt;/b&gt; are supported too and have an equivalent meaning as Equals or its negation.&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
Nullable types
&lt;/h3&gt; &lt;br /&gt;Entity properties that have been marked as Nullable because it aren't reference types and the field is not defined as required in the SharePoint list definition can be checked for null values in two ways:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
u.Age.HasValue
u.Age != null
&lt;/pre&gt;To reference the value of the nullable property, two approaches exist as well:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
u.Age == 24
u.Age.Value == 24
&lt;/pre&gt;In Visual Basic, the second approach has to be followed, while C# provides more flexibility so that you can drop the .Value property call.&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
Working with Choice and MultiChoice fields
&lt;/h3&gt; &lt;br /&gt;Choice and MultiChoice fields are mapped on enum types by the &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=SPMetal&amp;amp;referringTitle=Samples"&gt;SpMetal&lt;/a&gt; tool. Each &lt;a href="http://msdn2.microsoft.com/en-us/library/ms439235.aspx" class="externalLink"&gt;CHOICE&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; from SharePoint is mapped on a field in the target enumeration, possibly decorated with a &lt;b&gt;ChoiceAttribute&lt;/b&gt; to indicate a different underlying name (for example [Choice(&amp;quot;Laurel &amp;amp; Hardy&amp;quot;)] will be applied on an enum field LaurelHardy). MultiChoice fields (represented by radio buttons in SharePoint) are mapped on a &lt;a href="http://www.codeplex.com/LINQtoSharePoint/Wiki/View.aspx?title=Flags&amp;amp;referringTitle=Samples"&gt;Flags&lt;/a&gt; enumeration where all values are powers of two to allow bitwise combination. Examples are shown below:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
[Flags]
enum FavoriteFood
{
   Pizza = 1,
   Lasagna = 2,
   Hamburger = 4
}
 
enum MembershipType
{
   Gold,
   Silver,
   Bronze
}
&lt;/pre&gt; &lt;br /&gt;Conditions on &lt;b&gt;Choice fields&lt;/b&gt; should look like this:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
u.MembershipType == MembershipType.Silver
u.MembershipType != MembershipType.Gold
&lt;/pre&gt;and are translated into &amp;lt;Eq&amp;gt; or &amp;lt;Neq&amp;gt; CAML conditions. Comparison operators like &amp;lt;, &amp;lt;=, &amp;gt; and &amp;gt;= won't trigger compilation or runtime errors but shouldn't be used.&lt;br /&gt; &lt;br /&gt;Conditions on &lt;b&gt;MultiChoice fields&lt;/b&gt; should look like this:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
u.FavoriteFood == FavoriteFood.Pizza
u.FavoriteFood != FavoriteFood.Pizza
u.FavoriteFood == (FavoriteFood.Pizza | FavoriteFood.Lasagna)
&lt;/pre&gt;&lt;b&gt;Warning:&lt;/b&gt; There's a semantic mismatch between LINQ queries for MultiChoice fields and what you normally expect in C#.&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;The first condition means that Pizza should be &lt;u&gt;one of&lt;/u&gt; the choices applied for the list item. To that respect, it's equivalent to the &lt;i&gt;(u.FavoriteFood &amp;amp; FavoriteFood.Pizza) == FavoriteFood.Pizza&lt;/i&gt; syntax normally used to check enumeration flags. This syntax isn't supported though.&lt;/li&gt;&lt;li&gt;In a similar fashion, the second condition means that Pizza shouldn't be in the list of favorite foods of the list item; it doesn't restrict any other values though.&lt;/li&gt;&lt;li&gt;The last condition is equivalent to &lt;i&gt;u.FavoriteFood == FavoriteFood.Pizza || u.FavoriteFood == FavoriteFood.Lasagna&lt;/i&gt; but again it doesn't rule out the presence of other choices on the list item.&lt;/li&gt;
&lt;/ul&gt;If you want to use an absolute equality check, it should be written manually. For example, to find people who only like Pizza (and nothing but that), you'd have to write &lt;i&gt;u.FavoriteFood == FavoriteFood.Pizza &amp;amp;&amp;amp; u.FavoriteFood != FavoriteFood.Lasagna &amp;amp;&amp;amp; u.FavoriteFood != FavoriteFood.Hamburger&lt;/i&gt;.&lt;br /&gt; &lt;br /&gt;Fields with &lt;b&gt;fill-in choices&lt;/b&gt; will have an additional mapping field of type string that can be null (no fill-in choice made) or set to some string. This mapping field is cross-linked from the original field using the &lt;b&gt;OtherChoice&lt;/b&gt; property of the &lt;b&gt;FieldAttribute&lt;/b&gt; mapping, like this:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
    /// &amp;lt;summary&amp;gt;
    /// Favorite food
    /// &amp;lt;/summary&amp;gt;
    [Field(&amp;quot;Favorite food&amp;quot;, FieldType.MultiChoice, Id = &amp;quot;c48610a1-098e-438c-9f77-6e65c6a392cb&amp;quot;, OtherChoice = &amp;quot;FavoriteFoodOther&amp;quot;)]
    public FavoriteFood? FavoriteFood { get; set; }
 
    /// &amp;lt;summary&amp;gt;
    /// Favorite food 'Fill-in' value
    /// &amp;lt;/summary&amp;gt;
    [Field(&amp;quot;Favorite food&amp;quot;, FieldType.Text, Id = &amp;quot;c48610a1-098e-438c-9f77-6e65c6a392cb&amp;quot;)]
    public string FavoriteFoodOther { get; set; }
&lt;/pre&gt; &lt;br /&gt;The fill-in choice entity property can used in queries too:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
u.FavoriteFoodOther == &amp;quot;Steak&amp;quot;
u.FavoriteFoodOther != &amp;quot;Steak&amp;quot;
&lt;/pre&gt;Again, the semantic mismatch applies and putting a condition on the fill-in choice doesn't say anything about the possible presence of other choices. Therefore, the first condition will retrieve all the people who like Steak but necessarily &lt;u&gt;only&lt;/u&gt; Steak. The last condition retrieves everyone who doesn't like Steak.&lt;br /&gt; &lt;br /&gt;In the current implementation, the fill-in choice field can also be used to put restrictions on known choice values. For example, you could rewrite &lt;i&gt;u.FavoriteFood == FavoriteFood.Pizza&lt;/i&gt; with &lt;i&gt;u.FavoriteFoodOther == &amp;quot;Pizza&amp;quot;&lt;/i&gt;. To this respect, the 'Other' suffix on fill-in choice fields is a bit of a misnomer. This flexibility allows the list definition to be extended with new CHOICE values, without having to change the code. For example, u.FavoriteFoodOther == &amp;quot;Steak&amp;quot; will keep working even when Steak is added as a recognized pre-defined CHOICE value on the field.&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
Boolean negation
&lt;/h3&gt; &lt;br /&gt;Boolean negation isn't supported directly in CAML, but LINQ to SharePoint knows how to invert most of the supported comparison operators and implements &lt;a href="http://en.wikipedia.org/wiki/De_Morgan's_laws" class="externalLink"&gt;De Morgan's laws&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; to transform Boolean conditions with negations into a negation-less equivalent. A few examples:&lt;br /&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;!(u.Age == 24) becomes u.Age != 24 (&amp;lt;Neq&amp;gt;...&amp;lt;/Neq&amp;gt;)&lt;/li&gt;&lt;li&gt;!(u.Age &amp;lt;= 24) becomes u.Age &amp;gt; 24 (&amp;lt;Lt&amp;gt;...&amp;lt;/Lt&amp;gt;)&lt;/li&gt;&lt;li&gt;!(u.Age &amp;gt; 24 &amp;amp;&amp;amp; u.FirstName == &amp;quot;Bart&amp;quot;) becomes u.Age &amp;lt;= 24 || u.FirstName != &amp;quot;Bart&amp;quot; (&amp;lt;Or&amp;gt;&amp;lt;Leq&amp;gt;...&amp;lt;/Leq&amp;gt;&amp;lt;Neq&amp;gt;...&amp;lt;/Neq&amp;gt;&amp;lt;/Or&amp;gt;)&lt;/li&gt;&lt;li&gt;!(u.Age &amp;gt;= 24 || !(u.FirstName == &amp;quot;Bart&amp;quot; &amp;amp;&amp;amp; u.AccountBalance &amp;lt; 1234)) becomes u.Age &amp;lt; 24 &amp;amp;&amp;amp; (u.FirstName == &amp;quot;Bart&amp;quot; &amp;amp;&amp;amp; u.AccountBalance &amp;lt; 1234) (&amp;lt;And&amp;gt;&amp;lt;Lt&amp;gt;...&amp;lt;/Lt&amp;gt;&amp;lt;And&amp;gt;&amp;lt;Eq&amp;gt;...&amp;lt;/Eq&amp;gt;&amp;lt;Lt&amp;gt;...&amp;lt;/Lt&amp;gt;&amp;lt;/And&amp;gt;&amp;lt;/And&amp;gt;)&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;Negation of the BeginsWith and Contains operators isn't supported though.&lt;br /&gt;
&lt;/div&gt;</description><author>bdesmet</author><pubDate>Sun, 17 Jun 2007 23:24:50 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Samples 20070617112450P</guid></item></channel></rss>