SlideShare a Scribd company logo
1 of 20
Language Integrated Query Ch. Vishwa Mohan Freelance Software Consultant & Corporate Trainer
Table of Contents ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Introducing LINQ ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
LINQ Basics ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
LINQ Basics
LINQ Basics ,[object Object],[object Object],[object Object],[object Object]
Introducing LINQ ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Introducing LINQ
LINQ Introduction ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
LINQ – Language INtegrated Query
LINQ Syntax var   customerQuery =  from  cust  in  customers  where  cust.City == "London"  select  cust;
LINQ Operators Classification
Standard Query Operators in LINQ ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Standard Query Operators in LINQ ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Standard Query Operators in LINQ ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Standard Query Operators in LINQ ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Extending LINQ ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
LINQ Project ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Visual Studio IDE Support for LINQ.   ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Thank You !

More Related Content

What's hot

React state
React  stateReact  state
React stateDucat
 
React + Redux Introduction
React + Redux IntroductionReact + Redux Introduction
React + Redux IntroductionNikolaus Graf
 
Introduction to .net framework
Introduction to .net frameworkIntroduction to .net framework
Introduction to .net frameworkArun Prasad
 
Core java concepts
Core java  conceptsCore java  concepts
Core java conceptsRam132
 
Understanding react hooks
Understanding react hooksUnderstanding react hooks
Understanding react hooksSamundra khatri
 
[Final] ReactJS presentation
[Final] ReactJS presentation[Final] ReactJS presentation
[Final] ReactJS presentation洪 鹏发
 
Introduction to React JS for beginners | Namespace IT
Introduction to React JS for beginners | Namespace ITIntroduction to React JS for beginners | Namespace IT
Introduction to React JS for beginners | Namespace ITnamespaceit
 
ASP.NET Web API
ASP.NET Web APIASP.NET Web API
ASP.NET Web APIhabib_786
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework Serhat Can
 
Intro to Asynchronous Javascript
Intro to Asynchronous JavascriptIntro to Asynchronous Javascript
Intro to Asynchronous JavascriptGarrett Welson
 

What's hot (20)

Intro to React
Intro to ReactIntro to React
Intro to React
 
React state
React  stateReact  state
React state
 
React + Redux Introduction
React + Redux IntroductionReact + Redux Introduction
React + Redux Introduction
 
Introduction to .net framework
Introduction to .net frameworkIntroduction to .net framework
Introduction to .net framework
 
Core java concepts
Core java  conceptsCore java  concepts
Core java concepts
 
Introduction To C#
Introduction To C#Introduction To C#
Introduction To C#
 
File handling
File handlingFile handling
File handling
 
Understanding react hooks
Understanding react hooksUnderstanding react hooks
Understanding react hooks
 
ReactJS presentation.pptx
ReactJS presentation.pptxReactJS presentation.pptx
ReactJS presentation.pptx
 
React hooks
React hooksReact hooks
React hooks
 
[Final] ReactJS presentation
[Final] ReactJS presentation[Final] ReactJS presentation
[Final] ReactJS presentation
 
Wrapper class
Wrapper classWrapper class
Wrapper class
 
Web api
Web apiWeb api
Web api
 
Introduction to C# Programming
Introduction to C# ProgrammingIntroduction to C# Programming
Introduction to C# Programming
 
Introduction to React JS for beginners | Namespace IT
Introduction to React JS for beginners | Namespace ITIntroduction to React JS for beginners | Namespace IT
Introduction to React JS for beginners | Namespace IT
 
Angular modules in depth
Angular modules in depthAngular modules in depth
Angular modules in depth
 
ASP.NET Web API
ASP.NET Web APIASP.NET Web API
ASP.NET Web API
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
 
Typescript ppt
Typescript pptTypescript ppt
Typescript ppt
 
Intro to Asynchronous Javascript
Intro to Asynchronous JavascriptIntro to Asynchronous Javascript
Intro to Asynchronous Javascript
 

Viewers also liked (14)

Linq
LinqLinq
Linq
 
Introduccion a LINQ
Introduccion a LINQIntroduccion a LINQ
Introduccion a LINQ
 
Linq
LinqLinq
Linq
 
ILR 101
ILR 101ILR 101
ILR 101
 
Framework .NET 3.5 10 Linq
Framework .NET 3.5 10 LinqFramework .NET 3.5 10 Linq
Framework .NET 3.5 10 Linq
 
Programación con linq
Programación con linqProgramación con linq
Programación con linq
 
jQuery
jQueryjQuery
jQuery
 
Introducing LINQ
Introducing LINQIntroducing LINQ
Introducing LINQ
 
Module 3: Introduction to LINQ (PowerPoint Slides)
Module 3: Introduction to LINQ (PowerPoint Slides)Module 3: Introduction to LINQ (PowerPoint Slides)
Module 3: Introduction to LINQ (PowerPoint Slides)
 
LINQ and LINQPad
LINQ and LINQPadLINQ and LINQPad
LINQ and LINQPad
 
Task Parallel Library 2014
Task Parallel Library 2014Task Parallel Library 2014
Task Parallel Library 2014
 
Of Lambdas and LINQ
Of Lambdas and LINQOf Lambdas and LINQ
Of Lambdas and LINQ
 
OPC Unified Architecture
OPC Unified ArchitectureOPC Unified Architecture
OPC Unified Architecture
 
Syncope
SyncopeSyncope
Syncope
 

Similar to Linq

Linq in C# 3.0: An Overview
Linq in C# 3.0: An OverviewLinq in C# 3.0: An Overview
Linq in C# 3.0: An Overviewpradeepkothiyal
 
New c sharp3_features_(linq)_part_iv
New c sharp3_features_(linq)_part_ivNew c sharp3_features_(linq)_part_iv
New c sharp3_features_(linq)_part_ivNico Ludwig
 
NHDay Introduction to LINQ2NH
NHDay Introduction to LINQ2NHNHDay Introduction to LINQ2NH
NHDay Introduction to LINQ2NHGian Maria Ricci
 
Module 3: Introduction to LINQ (Material)
Module 3: Introduction to LINQ (Material)Module 3: Introduction to LINQ (Material)
Module 3: Introduction to LINQ (Material)Mohamed Saleh
 
LINQ 2 SQL Presentation To Palmchip And Trg, Technology Resource Group
LINQ 2 SQL Presentation To Palmchip  And Trg, Technology Resource GroupLINQ 2 SQL Presentation To Palmchip  And Trg, Technology Resource Group
LINQ 2 SQL Presentation To Palmchip And Trg, Technology Resource GroupShahzad
 
The LINQ Between XML and Database
The LINQ Between XML and DatabaseThe LINQ Between XML and Database
The LINQ Between XML and DatabaseIRJET Journal
 
New c sharp3_features_(linq)_part_iv
New c sharp3_features_(linq)_part_ivNew c sharp3_features_(linq)_part_iv
New c sharp3_features_(linq)_part_ivNico Ludwig
 
New c sharp3_features_(linq)_part_v
New c sharp3_features_(linq)_part_vNew c sharp3_features_(linq)_part_v
New c sharp3_features_(linq)_part_vNico Ludwig
 
C# advanced topics and future - C#5
C# advanced topics and future - C#5C# advanced topics and future - C#5
C# advanced topics and future - C#5Peter Gfader
 
Language Integrated Query - LINQ
Language Integrated Query - LINQLanguage Integrated Query - LINQ
Language Integrated Query - LINQDoncho Minkov
 

Similar to Linq (20)

Linq
LinqLinq
Linq
 
Link quries
Link quriesLink quries
Link quries
 
LINQ.pptx
LINQ.pptxLINQ.pptx
LINQ.pptx
 
Linq in C#
Linq in C#Linq in C#
Linq in C#
 
Linq in C# 3.0: An Overview
Linq in C# 3.0: An OverviewLinq in C# 3.0: An Overview
Linq in C# 3.0: An Overview
 
Linq
LinqLinq
Linq
 
Linq
LinqLinq
Linq
 
New c sharp3_features_(linq)_part_iv
New c sharp3_features_(linq)_part_ivNew c sharp3_features_(linq)_part_iv
New c sharp3_features_(linq)_part_iv
 
Beginning linq
Beginning linqBeginning linq
Beginning linq
 
B_110500002
B_110500002B_110500002
B_110500002
 
NHDay Introduction to LINQ2NH
NHDay Introduction to LINQ2NHNHDay Introduction to LINQ2NH
NHDay Introduction to LINQ2NH
 
Module 3: Introduction to LINQ (Material)
Module 3: Introduction to LINQ (Material)Module 3: Introduction to LINQ (Material)
Module 3: Introduction to LINQ (Material)
 
Think in linq
Think in linqThink in linq
Think in linq
 
Olap
OlapOlap
Olap
 
LINQ 2 SQL Presentation To Palmchip And Trg, Technology Resource Group
LINQ 2 SQL Presentation To Palmchip  And Trg, Technology Resource GroupLINQ 2 SQL Presentation To Palmchip  And Trg, Technology Resource Group
LINQ 2 SQL Presentation To Palmchip And Trg, Technology Resource Group
 
The LINQ Between XML and Database
The LINQ Between XML and DatabaseThe LINQ Between XML and Database
The LINQ Between XML and Database
 
New c sharp3_features_(linq)_part_iv
New c sharp3_features_(linq)_part_ivNew c sharp3_features_(linq)_part_iv
New c sharp3_features_(linq)_part_iv
 
New c sharp3_features_(linq)_part_v
New c sharp3_features_(linq)_part_vNew c sharp3_features_(linq)_part_v
New c sharp3_features_(linq)_part_v
 
C# advanced topics and future - C#5
C# advanced topics and future - C#5C# advanced topics and future - C#5
C# advanced topics and future - C#5
 
Language Integrated Query - LINQ
Language Integrated Query - LINQLanguage Integrated Query - LINQ
Language Integrated Query - LINQ
 

More from Vishwa Mohan (13)

WPF
WPFWPF
WPF
 
Wwf
WwfWwf
Wwf
 
Da package usersguide
Da package usersguideDa package usersguide
Da package usersguide
 
Dareadme
DareadmeDareadme
Dareadme
 
CSharp Presentation
CSharp PresentationCSharp Presentation
CSharp Presentation
 
Uml
UmlUml
Uml
 
Xml
XmlXml
Xml
 
Real Time Systems & RTOS
Real Time Systems & RTOSReal Time Systems & RTOS
Real Time Systems & RTOS
 
Embedded Linux
Embedded LinuxEmbedded Linux
Embedded Linux
 
Introduction To Embedded Systems
Introduction To Embedded SystemsIntroduction To Embedded Systems
Introduction To Embedded Systems
 
Microsoft.Net
Microsoft.NetMicrosoft.Net
Microsoft.Net
 
Zig Bee
Zig BeeZig Bee
Zig Bee
 
WCF
WCFWCF
WCF
 

Linq

Editor's Notes

  1. Th
  2. Language Integrated Query ( LINQ , pronounced "link") is a Microsoft .NET Framework component that adds native data querying capabilities to .NET languages using a syntax reminiscent of SQL. Many of the concepts that LINQ has introduced were originally tested in Microsoft's Cω research project. LINQ was released as a part of .NET Framework 3.5 on November 19, 2007. LINQ is available for any .NET languages. Through visual Studio you can find support for C#, VB.NET. LINQ is a uniform programming model for any kind of data it introduces queries as first class concept in any .NET languages.
  3. You can write LINQ queries against various enumerable data sources (that is, a data source that implements the IEnumerable interface). Examples are in-memory data structures (Collections, Lists, etc.,), XML documents, SQL databases, and  DataSet objects. LINQ to SQ L: Allows to querying a relational structure by converting LINQ query into a native SQL Query. LINQ to Dataset : Interacts with data already in ADO.NET DataSet structures. LINQ to Entity : To query a logical model that usually has a higher-level representation of data information compared to direct access to relational data sources. When LINQ query operates on data that is on relational database, the LINQ query generates an equivalent SQL statements.
  4. The above query can be applied to SQL Database , DataSet, or an array of objects in memory or many other kinds of data. Here Customer could be a collection of objects. The SQL like syntax in LINQ called as query expressions . The reason to start with a from clause instead of a select statement, as in SQL syntax, is related to the need to provide Microsoft IntelliSense capabilities within the remaining part of the query, which makes writing conditions, selections, and any other LINQ query clauses easier.
  5. At the core, LINQ works over anything that implements IEnumerable . Natively includes a number of lists that are part of the .NET Framework as well as lists you create. It also works with lists of elements and attributes present in XML documents as well as fields and tables present in DataSets. By extending the base IEnumerable with a new interface, IQueryable , we can add a layer which retains the query structure and has the ability to translate it into a language more native to the underlying data source (like TSQL for SQL Server). Out of the box, the .NET Framework ships with two such providers: LINQ to SQL and LINQ to Entities.
  6. The where query operator defines the restriction to filter the collection. The Orderxx operators are used for sorting. ThenBy and ThenByDescending operators are used for a secondary sort if the first sort gives similar result.
  7. The where query operator defines the restriction to filter the collection. The Orderxx operators are used for sorting. ThereBy and ThereByDescending operators are used for a secondary sort if the first sort gives similar result.
  8. Add some more stuff on Extending LINQ (CVM)