SlideShare a Scribd company logo
Introduction to LINQ
Pakorn Weecharungsan
Contents
 What is LINQ?
 LINQ Providers
 Fundamental LINQ syntax
What is LINQ?
 LINQ (Language Integrated Query) is a
new feature of C# and Visual Basic .NET t
hat integrates into these languages the abi
lity to query data
What is LINQ?
LINQ Providers
 LINQ to Objects
 LINQ to XML
 LINQ Support for ADO.NET
LINQ to SQL
LINQ to Datasets
LINE to Entities
Query Syntax and Method Syntax
 Query syntax is a declarative form that
looks very much like an SQL statement.
Query syntax is written in the form of
query expressions
 Method syntax is an imperative form,
which uses standard method invocations.
The methods are from a set called the
standard query operators
Query Syntax and Method Syntax
The Structure of Query
Expressions
The from clause
 The from clause specifies the data
collection that is to be used as the data
source. It also introduces the iteration
variable
The join clause
 The join clause in LINQ is much like the
JOIN clause in SQL
The where Clause
 The where clause eliminates items from
further consideration if they don’t meet the
specified condition. The syntax of the
where clause is the following
The where Clause
The orderby Clause
 The orderby clause takes an expression
and returns the result items in order
according to the expression
The orderby Clause
The group Clause
 The group clause groups the selected
objects according to some criterion. For
example, with the array of students in the
previous examples, the program could
group the students according to their
majors
The group Clause
The Standard Query Operators
 The standard query operators comprise a
set of methods called an application
programming interface (API) that lets you
query any .NET array or collection
The Standard Query Operators

More Related Content

PPTX
Linq view part1
PPT
Semantic RDF based integration framework for heterogeneous XML data sources
PDF
All You Need is Structure
PPT
Ef code first
PPTX
3 where are my keys - sql explore
ODP
Introducing Xapian
PDF
Linq view part1
Semantic RDF based integration framework for heterogeneous XML data sources
All You Need is Structure
Ef code first
3 where are my keys - sql explore
Introducing Xapian

What's hot (6)

PDF
Let's start GraphQL: structure, behavior, and architecture
PDF
Xml databases
PDF
Express Yourself: Building Expressions with Microsoft Flow - SPSCLT 2018
PDF
PPTX
Introduction to GraphQL
Let's start GraphQL: structure, behavior, and architecture
Xml databases
Express Yourself: Building Expressions with Microsoft Flow - SPSCLT 2018
Introduction to GraphQL
Ad

Viewers also liked (8)

PPT
D3 Exceptions
PDF
Yourprezi
PPTX
How to create mvc application
PPTX
Selenium – Web Browser Automation
PDF
Профессиональные консультации от Светланы Деревенко
DOC
Examen micro
PPTX
10 skills developers should invest in for 2014
PPTX
Automated Testing vs. Manual Testing
D3 Exceptions
Yourprezi
How to create mvc application
Selenium – Web Browser Automation
Профессиональные консультации от Светланы Деревенко
Examen micro
10 skills developers should invest in for 2014
Automated Testing vs. Manual Testing
Ad

Similar to D4 Introduction to LINQ (20)

PPT
PPTX
LINQ PPT.pptx
DOCX
Linq in C#
PPTX
LINQ in C#
PPTX
SQL ttrain wrwrwrw wwrw wwrrrwrwrwrwwrwr.pptx
PPTX
Asp.net c# mvc Training-Day-5 of Day-9
PPT
Linq
PDF
The LINQ Between XML and Database
PPTX
Link quries
PPT
LINQ to Relational in Visual Studio 2008 SP1
PPTX
Understanding LINQ in C#
PPT
B_110500002
PPT
Olap
PPTX
Building N Tier Applications With Entity Framework Services 2010
PPT
Language Integrated Query - LINQ
PDF
.NET Core, ASP.NET Core Course, Session 14
PDF
Oracle11gdevtrainingindelhincr
PPTX
Linq to xml
PPTX
C# advanced topics and future - C#5
LINQ PPT.pptx
Linq in C#
LINQ in C#
SQL ttrain wrwrwrw wwrw wwrrrwrwrwrwwrwr.pptx
Asp.net c# mvc Training-Day-5 of Day-9
Linq
The LINQ Between XML and Database
Link quries
LINQ to Relational in Visual Studio 2008 SP1
Understanding LINQ in C#
B_110500002
Olap
Building N Tier Applications With Entity Framework Services 2010
Language Integrated Query - LINQ
.NET Core, ASP.NET Core Course, Session 14
Oracle11gdevtrainingindelhincr
Linq to xml
C# advanced topics and future - C#5

Recently uploaded (20)

PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Electronic commerce courselecture one. Pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPT
Teaching material agriculture food technology
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Cloud computing and distributed systems.
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
cuic standard and advanced reporting.pdf
PDF
Encapsulation theory and applications.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
Mobile App Security Testing_ A Comprehensive Guide.pdf
Spectral efficient network and resource selection model in 5G networks
Electronic commerce courselecture one. Pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Teaching material agriculture food technology
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Advanced methodologies resolving dimensionality complications for autism neur...
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Cloud computing and distributed systems.
Encapsulation_ Review paper, used for researhc scholars
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Unlocking AI with Model Context Protocol (MCP)
cuic standard and advanced reporting.pdf
Encapsulation theory and applications.pdf
MIND Revenue Release Quarter 2 2025 Press Release

D4 Introduction to LINQ

  • 2. Contents  What is LINQ?  LINQ Providers  Fundamental LINQ syntax
  • 3. What is LINQ?  LINQ (Language Integrated Query) is a new feature of C# and Visual Basic .NET t hat integrates into these languages the abi lity to query data
  • 5. LINQ Providers  LINQ to Objects  LINQ to XML  LINQ Support for ADO.NET LINQ to SQL LINQ to Datasets LINE to Entities
  • 6. Query Syntax and Method Syntax  Query syntax is a declarative form that looks very much like an SQL statement. Query syntax is written in the form of query expressions  Method syntax is an imperative form, which uses standard method invocations. The methods are from a set called the standard query operators
  • 7. Query Syntax and Method Syntax
  • 8. The Structure of Query Expressions
  • 9. The from clause  The from clause specifies the data collection that is to be used as the data source. It also introduces the iteration variable
  • 10. The join clause  The join clause in LINQ is much like the JOIN clause in SQL
  • 11. The where Clause  The where clause eliminates items from further consideration if they don’t meet the specified condition. The syntax of the where clause is the following
  • 13. The orderby Clause  The orderby clause takes an expression and returns the result items in order according to the expression
  • 15. The group Clause  The group clause groups the selected objects according to some criterion. For example, with the array of students in the previous examples, the program could group the students according to their majors
  • 17. The Standard Query Operators  The standard query operators comprise a set of methods called an application programming interface (API) that lets you query any .NET array or collection
  • 18. The Standard Query Operators