THE MANY FACES OF LINQ
LINQ (Language Integrated Query, pronounced “link”) is a data-selection mechanism designed to give programs the ability to select data in the same way from any data source. Ideally the program would be able to use exactly the same method to fetch data whether it’s stored in arrays, lists, relational databases, XML data, Excel worksheets, or some other data store. Currently the LINQ API supports data stored in relational databases, objects within the program stored in arrays or lists, and XML data.
LINQ queries often let a program make complex data selections with very little code. For example, suppose you’re writing a billing program and you want to list customers with outstanding balances ordered by their balances. You could certainly use Visual Basic code to loop through a customer list to find the customers and then sort the results, but a LINQ query can find and order them in a few simple lines. The result isn’t always as fast as optimized Visual Basic code but it is often much simpler ...
Get Visual Basic 2012 Programmer's Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.