August 24, 2012

Working with LINQ

Definition: LINQ [Language Integrated Query] defines a set of method names (called standard query operators, or standard sequence operators), along with translation rules from so-called query expressions to expressions using these method names, lambda expressions and anonymous types. These can, for example, be used to project and filter data into arrays, enumerable classes, XML (LINQ to XML), relational databases, and third party data sources.

Sample Query

results = (from a in myBrandsSite.LibraryBrandDiseaseList
                 where (a.LibraryID != null )
                 select a
                  ).ToList();

In the above sample query, [myBrandsSite.LibraryBrandDiseaseList] is the object[EntityList] which refers all the data from the list.
After that we filter the data from the [EntityList] with a condition.which stores the filtered data in [results].

No comments:

Migrate SharePoint 2010 Infopath to SharePoint Online

 Below are the steps to follow to migrate the Infopath data to SP Online.