Coming with C# 3.0 and VB.NET 9.0 with native language syntax for queries and provides class libraries to take advantage of these capabilities.
LINQ solves the impedance mismatch between the code that lives on a database server and the code we write with standard programming languages such as C# or VB.
Here are previous problems:
1. Worlds of Object Oriented and data access are far.
2. Object Oriented language types and native database types are often different
SQL statement is “inside the quotes”.
3. There is no strong typing or compile-time type checking.
4. Intellisense is not available.
5. SQL and XML have query languages, objects to not
LINQ seeks bridging the gap
Here are some of the benefits of LINQ:
- Strongly typed database connectionDesigner
c. Custom types
Intellisense and compiler validation
- “Strongly typed query”
- Super easy to write query
Easy to use
- Very powerful for read operations
- Absolutely recommended for 2-tier app
- Good for most ASP.NET architectures
- Where Data Access Layer and Presentation Layer are in the same process
- Doesn't have multi tier change tracking support
- ADO.NET Entity Framework is an alternative
- Works only with SQL Server