
In this exercise, you'll use LINQ to SQL to retrieve all contact details from the AdventureWorks Person.Contact table. They can be ported to other data sources with little or no modification.They provide powerful filtering, ordering, and grouping capabilities with a minimum of application code.They are more concise and readable, especially when filtering multiple conditions.LINQ queries offer three main advantages over traditional foreach loops: Or you can import text files into enumerable data structures and compare the contents to other files, extract lines or parts of lines, group matching lines from several files into a new collection, and so on. For example, you can use the System.Reflection classes to return information about types stored in a specified assembly, and then filter those results using LINQ. NET Framework APIs that return collections. This means that you can use LINQ queries not only with user-defined lists, arrays, dictionaries, and so on, but also in conjunction with. You can query any type that supports IEnumerable. The term LINQ to Objects refers to the use of LINQ queries to access in-memory data structures. LINQ query expressions (unlike traditional SQL statements) are strongly typed.LINQ speeds development time by catching many errors at compile time and including IntelliSense and debugging support.LINQ bridges the gap and strengthens the connection between relational data and the object-oriented world.LINQ offers common syntax for querying any type of data source for example, you can query an XML document in the same way as you query a SQL database, an ADO.NET dataset, an in-memory collection, or any other remote or local data source that you have chosen to connect to and access by using LINQ.

LINQ supports all these types of data stores using LINQ query expressions of first-class language constructs in C#. As I mentioned previously, LINQ introduces the standard and unified concept of querying various types of data sources falling in the range of relational databases, XML documents, and even in-memory data structures.

Microsoft continued with the LINQ feature with the recent releases of. NET Framework version 3.5 that promises to revolutionize the way that developers have been working with data before the release of. LINQ is an innovation that Microsoft made with the release of Visual Studio 2008 and.
