Introduction to LINQ: Language-Integrated Query
Introduction to LINQ:
!
Language-Integrated Query
What is LINQ?
- It is a feature introduced in VS 2008
!
- It is a language extension created for interacting with different data types: it is a declarative extension to an otherwise mostly imperative language.
!
- LINQ provides a way to write compact queries.
!
- LINQ allows to decouple the query structure from the data type
!
- LINQ can also filter and modify the data
!
- Many data types can now interact with LINQ. - LINQ is supported by IntelliSense: easier query development
!
- LINQ is supported by the debugger
!
- LINQ is backward-compatible with "old" data types.
LINQ Logical Layout C#
LINQ
Enabled Dataset Resources
LINQ to
Objects
LINQ to
DataSets
LINQ to
SQL
LINQ to
Entities
LINQ to
LINQ to
XML
Other dataset resources are available for connecting to other datasets. Examples: LINQ to Amazon, LINQ to Excel, LINQ to Flickr, LINQ to Google, ...
LINQ Namespaces
System.Linq! Contains the basic classes and interfaces.! ! System.Linq.Expressions! Contains classes and interfaces for creating LINQ expressions.! ! System.Data.Linq! Contains classes and interfaces for SQL database interactions.! ! System.Data.Linq.Mapping! Contains the elements allowing the mapping from/to and imperative language like C# and VB to a declarative language like SQL.! ! System.Data.SqlClient! Allows connections to SQL Server (MySQLserver needs something else).! ! System.Xml.Linq! Allows the interaction with data in XML format.
LINQ (Very!) Basic Example of Query Expression
!
//Create the data structure! String[] my_string = {"Red","Black","Blue","White"};!
!
//Create the LINQ query! var query = ! ! ! ! ! from a_string in my_string! ! ! ! ! select a_string + "\n";!
!
//Display the result:! foreach (var element in query)! ! ! Console.WriteLine(element);
The FROM-IN-SELECT is the simplest query you can build with LINQ
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- c 3 linq cornell university
- iap c 2011 lecture 2 linq and concurrency
- query expression lambda expressions
- calling functions in linq queries
- about the tutorial
- introduction to linq language integrated query
- type inference 3 0 features components in linq
- linq language features for concurrency among other
- example of a linq query tutorialspoint
Related searches
- introduction to financial management pdf
- introduction to finance
- introduction to philosophy textbook
- introduction to philosophy pdf download
- introduction to philosophy ebook
- introduction to marketing student notes
- introduction to marketing notes
- introduction to information systems pdf
- introduction to business finance pdf
- introduction to finance 15th edition
- introduction to finance books
- introduction to finance online course