Microsoft .NET Framework component Extends powerful query capabilities to the language syntax in .NET Introduces standard, easily-learned patterns for querying and updating data Extendable
1. Data source. int[] numbers = new int[7] { 0, 1, 2, 3, 4, 5, 6 }; // 2. Query creation. // numQuery is an IEnumerable<int> var numQuery = from num in numbers where (num % 2) == 0 select num; // 3. Query execution. foreach (int num in numQuery) { Console.Write("{0,1} ", num); }
we need to search Facebook for the people who likes it as well as Twitter for the followers of Microsoft, then combine it with all our customers under the age of 55 that lives in any of our operational areas including the latest price from NASDAQ. This information need to be merged, ordered by surname and grouped by age. We need to export it to an Excel Spreadsheet.