O'Reilly logo

Microsoft Visual Studio 2015 Unleashed, Third Edition by Mike Snell, Lars Powers

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

An Overview of LINQ

LINQ is an acronym for Language Integrated Query. It is a component introduced as a framework component with .NET Framework 3.5 that adds SQL-like querying capabilities to .NET objects. Specifically, it extends the core .NET languages (Visual Basic and C#) and the runtime to try to erase the object-to-database-entity barrier. Both Visual Basic and C# support new query operators that operate over objects similar to the way SQL operates over tables in a database.

For example, you could query for all approved invoice objects like this.

var approved =    from invoice in invoices    where (invoice.Approved) == true    select invoice;foreach (Invoice invoice in approved){    // do some work here}

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required