Retrieving data in SharePoint using LINQ to SharePoint

Source: Internet
Author: User
Tags object model web services visual studio

LINQ to SharePoint is a custom LINQ provider that lets you query the data for a SharePoint list using familiar LINQ syntax. This way, when you're working on a query for SharePoint data, you won't be bothered by the complex usage of CAML.

Its basic features include:

Convert query expression to CAML (collaborative application Markup Language)

Support for C # 3.0 and Visual Basic 9.0

Provides an entity creation tool spmetal that can generate entity classes for querying based on the definition of a SharePoint list

The entity classes are automatically generated through the so-called SPML (SharePoint Markup Language) integrated with Visual Studio.

Data can be accessed both through the SharePoint object model and through SharePoint Web Services.

The best way to learn to use LINQ to SharePoint is to watch this how-to video from the Office Development Center on MSDN, as well as the introduction video on Channel 9.

Of course, the current LINQ to SharePoint is not perfect, and does not have the ability to update. Lordan, of the blog Park, spoke in a blog post titled "LINQ to SharePoint Usage Feelings":

The biggest advantage is that I don't have to write caml, it is very easy to implement some simple query features developed on the development machine, and then deployed to the test environment and production environment, the ID is not the same, I have to revise this value to compile, and the most depressing is that version is often changed.

For version often change the problem, there are users to solve the solution:

You can set property Resolution: Sharepointdatacontext.checklistversion = False

Although this is a less-than-perfect component, it also provides some help for SharePoint development and is useful for learning to implement a LINQ provider. I hope you can contribute to this open source project, to continuously improve it.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.