We use the term language-integrated query to indicate that query is an integrated feature of the developer's primary programming languages (for example, Visual C#, Visual Basic). Language-integrated query allows query expressions to benefit from the rich metadata, compile-time syntax checking, static typing and IntelliSense that was previously available only to imperative code. Language-integrated query also allows a single general purpose declarative query facility to be applied to all in-memory information, not just information from external sources.
Full meaning of LINQ is 'Language Integrated Query', which replaces the traditional sql query execution process. Moreover, it doesn't only applicable to manipulate database results, but it can also be used to manipulates array/list collections. LinQ was released as part of the .NET framework 3.0 and can be used from languages supported by .NET framework like C#, VB etc. The term 'LINQ To SQL' refers to the technology by which we can use LINQ for access SQL Databases.
The purpose of LINQ is to provide a type-safe mechanism for querying local object collections and remote data sources, which is built into the language itself.
LINQ takes various forms including : LINQ to Objects, LINQ to XML, LINQ to SQL and the Entity Framework all of which allow the data source to be queried in a similar fashion, using either extension methods or query expressions.
LINQ is 'declarative' in that you tell it what you want doing as opposed to how to do it.
This can save a lot of tedious coding when querying local object collections as you don't have to write the code to filter, sort, join, group etc. the objects yourself.
When querying remote data sources, LINQ provides a less complicated alternative to writing SQL queries manually - the latter are written for you in the background.
- ADO is more of a "do-it-yourself" approach, which provides the most flexibility of the 3, but at the cost of more work (creating objects and such). - Linq2SQL and EF do a lot of the plumbing work for you, and you're left with just implementing your business rules for the most part, so in theory you have a shorter development time.
The pragmatist in me says do not just what's best for the problem you're trying to solve, but also what your team is most comfortable with. If you need to get something to market quickly and your team knows ADO.NET really well, you may not want to chose this time to have them learn EF!
As per my knowledge about LINQ, linq not broken SQL but the need of LINQ is its Intigrated with C# (VB) useful for eliminating the impedance mismatch between programming languages and databases. LINQ is simple for use compare to SQL.but thing is that they both have their own area of benifits.
AartiPosted Jan 4, 2012, 7:14 AM
LINQ:
We use the term language-integrated query to indicate that query is an integrated feature of the developer's primary programming languages (for example, Visual C#, Visual Basic). Language-integrated query allows query expressions to benefit from the rich metadata, compile-time syntax checking, static typing and IntelliSense that was previously available only to imperative code. Language-integrated query also allows a single general purpose declarative query facility to be applied to all in-memory information, not just information from external sources.
Jignesh TrivediPosted Jan 3, 2012, 4:13 AM
Full meaning of LINQ is 'Language Integrated Query', which replaces the traditional sql query execution process. Moreover, it doesn't only applicable to manipulate database results, but it can also be used to manipulates array/list collections. LinQ was released as part of the .NET framework 3.0 and can be used from languages supported by .NET framework like C#, VB etc. The term 'LINQ To SQL' refers to the technology by which we can use LINQ for access SQL Databases.
also refer.
http://codesamplez.com/database/linq-to-sql-c-sharp-tutorial
http://msdn.microsoft.com/en-us/library/bb397897.aspx
http://msdn.microsoft.com/en-us/library/bb399398.aspx
hope this help.
VulpesPosted Sep 21, 2011, 4:55 AM
LINQ takes various forms including : LINQ to Objects, LINQ to XML, LINQ to SQL and the Entity Framework all of which allow the data source to be queried in a similar fashion, using either extension methods or query expressions.
Hemant KumarPosted Sep 21, 2011, 2:56 AM
- Linq2SQL and EF do a lot of the plumbing work for you, and you're left with just implementing your business rules for the most part, so in theory you have a shorter development time.
The pragmatist in me says do not just what's best for the problem you're trying to solve, but also what your team is most comfortable with. If you need to get something to market quickly and your team knows ADO.NET really well, you may not want to chose this time to have them learn EF!
Pravin MorePosted Sep 21, 2011, 12:33 AM
As per my knowledge about LINQ, linq not broken SQL but the need of LINQ is its Intigrated with C# (VB) useful for eliminating the impedance mismatch between programming languages and databases.
LINQ is simple for use compare to SQL.but thing is that they both have their own area of benifits.
Thanx,
Pravin.
Lalit MPosted Sep 21, 2011, 12:25 AM
Visit this link
Use In SQL
Use In ASP.Net