How to Get All the Lists Using LINQ in Sharepoint

Language-Integrated Queries, or LINQ, can help you extract data from Sharepoint and import it into a program written in Visual Basic. Both the Visual Basic language and Sharepoint were developed by Microsoft Corporation. Support for LINQ is built into all recent versions of the program to allow efficient data extraction. You can get all the lists stored in Sharepoint by editing your Visual Basic application's source code.

Instructions

    • 1

      Launch a dedicated Visual Basic editor or Notepad and open the source code of your LINQ program.

    • 2

      Type the following code in the editor:

      Dim var1 As New SharePointDataContext(address)
      Dim var2 = From * In *
      Console.WriteLine(var2)
      Next

      Replace "address" with the uniform resource locator addressed assigned to your Sharepoint server.

      This code will extract all the lists from your Sharepoint installation, store them in the "var2" variable and print them on the screen.

    • 3

      Save your file.

Related Searches:

References

Comments

Related Ads

Featured