Tuesday, November 15, 2011

LINQ (Language Integrated Query) in c#

It is very common for applications to use data in SQL databases or XML documents. Traditionally, developers had to learn a primary programming language, such as C#, and a secondary language, such as SQL or XQuery. Language-Integrated Query (LINQ) brings query capabilities into the C# language itself. Now, instead of learning a separate query language, you can use your knowledge of C#, together with some additional keywords and concepts, to query SQL databases, ADO.NET datasets, XML documents, and any .NET collection class that implements the IEnumerable interface.


Advantages :-

  • Familiar syntax for writing queries.
  • Compile-time checking for syntax errors and type safety.
  • Improved debugger support.
  • IntelliSense support.
  • Ability to work directly with XML elements instead of creating a container XML document, as required with W3C DOM.
  • In-memory XML document modification that is powerful, yet simpler to use than XPath or XQuery.
  • Powerful filtering, ordering, and grouping capabilities.
  • Consistent model for working with data across various kinds of data sources and formats.

    For Examples of Linq Go to THIS.

No comments:

Post a Comment