Linq to SharePoint 2010 Custom Provider

No.of Views900
Bookmarked0 times
Downloads 
Votes0
By  usamawahabkhan   On  21 Jun 2010 09:06:11
Tag : SharePoint , Development and Programming
The LINQ to SharePoint project provides a custom query provider for LINQ that allows querying 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.
emailbookmarkadd commentsprint

Images in this article missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at info@codegain.com

 

Introduction

The LINQ to SharePoint project provides a custom query provider for LINQ that allows querying 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. 

Image Loading

it will support Custom Query Provider that Translates LINQ  to CAML, the "Collaborative Application Markup Language" by SharePoint for querying by using LINQ  you  didn’t need other software to query in caml like u2u as we know c#3.0 and vb.net 9.0 were support LINQ  Entity Creation tool "SpMetal" to export SharePoint list definitions to entity Classes used for Querying and Visual Studio 2008 integration for entity Creation (a.ka SPML) make it more essay and simple you can connect sp site either using SharePoint Object Model or via the Share Point Web services Planned to Support for updating through Entity type.

This wonderful Solution Invented by former Visual C# MVP, Bart De Smet now works at Microsoft Corporation on the WPF dev team in an SDE role. So enjoy with SharePoint to LINQ .

 

Image Loading

Sample

Updated for the 0.2.2.0 alpha release
var ctx = new SharePointDataContext(new Uri("http://wss.mycompany.local"));
ctx.Log = Console.Out;
var users = ctx.GetList(ctx);

var res = from u in users
orderby u.Birthdate descending
where u.FirstName.StartsWith("B") && u.Age >= 24 && u.FavoriteFood == FavoriteFood.Pizza
select new { u.FullName, u.Age, Interest = u.AccountBalance * 0.07 };

foreach (var u in res)
Console.WriteLine(u);

i hope this is help to you all.

 
Sign Up to vote for this article
 
About Author
 
usamawahabkhan
Occupation-Not Provided
Company-Not Provided
Member Type-Senior
Location-Pakistan
Joined date-06 May 2010
Home Page-Not Provided
Blog Page-Not Provided
 
 
Other popularSectionarticles
Comments
There is no comments for this articles.
Leave a Reply
Title:
Display Name:
Email:
(not display in page for the security purphase)
Website:
Message:
Please refresh your screen using Ctrl+F5
If you can't read this number refresh your screen
Please input the anti-spam code that you can read in the image.
^ Scroll to Top