August 29, 2012

LINQ Queries



Here are sample linq queries:
 
1) results2 = (from a in myBrandsSite.LibraryBrandDiseaseList
                where (a.LibraryID != null && 
                       a.LibraryID.ExpirationDate >= DateTime.Today && 
                       arrayBrands.Contains(a.Brand.Title))
                select a ).ToList();
 
-- Here in the above query arrayBrands is a string array with selected options and 
   (a.Brand.Title) is the option value present in a list. 
-- The above query executes and fetches all the records which are not null and not 
   expired and fetches the data which have a value.
-- The  


No comments:

Migrate SharePoint 2010 Infopath to SharePoint Online

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