SlideShare a Scribd company logo
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

12. Indexing and Hashing in DBMS
12. Indexing and Hashing in DBMS12. Indexing and Hashing in DBMS
12. Indexing and Hashing in DBMS
koolkampus
 
JSON: The Basics
JSON: The BasicsJSON: The Basics
JSON: The Basics
Jeff Fox
 
Data structures and algorithms
Data structures and algorithmsData structures and algorithms
Data structures and algorithms
Julie Iskander
 
Linked lists
Linked listsLinked lists
Linked lists
SARITHA REDDY
 
Arrays in Java
Arrays in JavaArrays in Java
Arrays in Java
Abhilash Nair
 
UNIT I LINEAR DATA STRUCTURES – LIST
UNIT I 	LINEAR DATA STRUCTURES – LIST 	UNIT I 	LINEAR DATA STRUCTURES – LIST
UNIT I LINEAR DATA STRUCTURES – LIST
Kathirvel Ayyaswamy
 
Data structures using C
Data structures using CData structures using C
Data structures using C
Prof. Dr. K. Adisesha
 
Delegates and events in C#
Delegates and events in C#Delegates and events in C#
Delegates and events in C#
Dr.Neeraj Kumar Pandey
 
Js ppt
Js pptJs ppt
Js ppt
Rakhi Thota
 
Jsp ppt
Jsp pptJsp ppt
Jsp ppt
Vikas Jagtap
 
Database Connectivity in PHP
Database Connectivity in PHPDatabase Connectivity in PHP
Database Connectivity in PHP
Taha Malampatti
 
Binary Tree Traversal
Binary Tree TraversalBinary Tree Traversal
Binary Tree Traversal
Dhrumil Panchal
 
jQuery for beginners
jQuery for beginnersjQuery for beginners
jQuery for beginners
Arulmurugan Rajaraman
 
Stored procedure
Stored procedureStored procedure
php
phpphp
Data Structures - Lecture 7 [Linked List]
Data Structures - Lecture 7 [Linked List]Data Structures - Lecture 7 [Linked List]
Data Structures - Lecture 7 [Linked List]
Muhammad Hammad Waseem
 
Data structure and algorithm using java
Data structure and algorithm using javaData structure and algorithm using java
Data structure and algorithm using java
Narayan Sau
 
Java Server Pages
Java Server PagesJava Server Pages
Java Server Pages
Kasun Madusanke
 
Basic Concepts of OOPs (Object Oriented Programming in Java)
Basic Concepts of OOPs (Object Oriented Programming in Java)Basic Concepts of OOPs (Object Oriented Programming in Java)
Basic Concepts of OOPs (Object Oriented Programming in Java)
Michelle Anne Meralpis
 
Input output streams
Input output streamsInput output streams
Input output streams
Parthipan Parthi
 

What's hot (20)

12. Indexing and Hashing in DBMS
12. Indexing and Hashing in DBMS12. Indexing and Hashing in DBMS
12. Indexing and Hashing in DBMS
 
JSON: The Basics
JSON: The BasicsJSON: The Basics
JSON: The Basics
 
Data structures and algorithms
Data structures and algorithmsData structures and algorithms
Data structures and algorithms
 
Linked lists
Linked listsLinked lists
Linked lists
 
Arrays in Java
Arrays in JavaArrays in Java
Arrays in Java
 
UNIT I LINEAR DATA STRUCTURES – LIST
UNIT I 	LINEAR DATA STRUCTURES – LIST 	UNIT I 	LINEAR DATA STRUCTURES – LIST
UNIT I LINEAR DATA STRUCTURES – LIST
 
Data structures using C
Data structures using CData structures using C
Data structures using C
 
Delegates and events in C#
Delegates and events in C#Delegates and events in C#
Delegates and events in C#
 
Js ppt
Js pptJs ppt
Js ppt
 
Jsp ppt
Jsp pptJsp ppt
Jsp ppt
 
Database Connectivity in PHP
Database Connectivity in PHPDatabase Connectivity in PHP
Database Connectivity in PHP
 
Binary Tree Traversal
Binary Tree TraversalBinary Tree Traversal
Binary Tree Traversal
 
jQuery for beginners
jQuery for beginnersjQuery for beginners
jQuery for beginners
 
Stored procedure
Stored procedureStored procedure
Stored procedure
 
php
phpphp
php
 
Data Structures - Lecture 7 [Linked List]
Data Structures - Lecture 7 [Linked List]Data Structures - Lecture 7 [Linked List]
Data Structures - Lecture 7 [Linked List]
 
Data structure and algorithm using java
Data structure and algorithm using javaData structure and algorithm using java
Data structure and algorithm using java
 
Java Server Pages
Java Server PagesJava Server Pages
Java Server Pages
 
Basic Concepts of OOPs (Object Oriented Programming in Java)
Basic Concepts of OOPs (Object Oriented Programming in Java)Basic Concepts of OOPs (Object Oriented Programming in Java)
Basic Concepts of OOPs (Object Oriented Programming in Java)
 
Input output streams
Input output streamsInput output streams
Input output streams
 

Viewers also liked

Linq
LinqLinq
Linq
samneang
 
Understanding linq
Understanding linqUnderstanding linq
Understanding linq
Anand Kumar Rajana
 
Introduccion a LINQ
Introduccion a LINQIntroduccion a LINQ
Introduccion a LINQ
Tonymx
 
Linq
LinqLinq
ILR 101
ILR 101ILR 101
ILR 101
jasdhillo
 
Framework .NET 3.5 10 Linq
Framework .NET 3.5 10 LinqFramework .NET 3.5 10 Linq
Framework .NET 3.5 10 Linq
Antonio Palomares Sender
 
Programación con linq
Programación con linqProgramación con linq
Programación con linq
Gabriel Espinoza Erices
 
Linq to sql
Linq to sqlLinq to sql
Linq to sql
Shivanand Arur
 
jQuery
jQueryjQuery
jQuery
Vishwa Mohan
 
Introducing LINQ
Introducing LINQIntroducing LINQ
Introducing LINQ
LearnNowOnline
 
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)
Mohamed Saleh
 
LINQ and LINQPad
LINQ and LINQPadLINQ and LINQPad
LINQ and LINQPad
Andreas Gullberg Larsen
 
Task Parallel Library 2014
Task Parallel Library 2014Task Parallel Library 2014
Task Parallel Library 2014
Lluis Franco
 
Of Lambdas and LINQ
Of Lambdas and LINQOf Lambdas and LINQ
Of Lambdas and LINQ
BlackRabbitCoder
 
OPC Unified Architecture
OPC Unified ArchitectureOPC Unified Architecture
OPC Unified Architecture
Vishwa Mohan
 
Syncope
SyncopeSyncope
Syncope
Zareen Kiran
 

Viewers also liked (16)

Linq
LinqLinq
Linq
 
Understanding linq
Understanding linqUnderstanding linq
Understanding 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
 
Linq to sql
Linq to sqlLinq to sql
Linq to sql
 
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
LinqLinq
Linq
ClickExpo
 
Link quries
Link quriesLink quries
Link quries
ulfat mushtaq
 
LINQ.pptx
LINQ.pptxLINQ.pptx
LINQ.pptx
IrfanPinjari2
 
Linq in C#
Linq in C#Linq in C#
Linq in C#
Umar Farooq
 
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
pradeepkothiyal
 
Linq
LinqLinq
Linq
tnkreddy
 
Linq
LinqLinq
Linq
tnkreddy
 
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
Nico Ludwig
 
Beginning linq
Beginning linqBeginning linq
Beginning linq
Shikha Gupta
 
B_110500002
B_110500002B_110500002
B_110500002
Vaibhav Chavan
 
NHDay Introduction to LINQ2NH
NHDay Introduction to LINQ2NHNHDay Introduction to LINQ2NH
NHDay Introduction to LINQ2NH
Gian 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
 
SQL ttrain wrwrwrw wwrw wwrrrwrwrwrwwrwr.pptx
SQL ttrain wrwrwrw wwrw wwrrrwrwrwrwwrwr.pptxSQL ttrain wrwrwrw wwrw wwrrrwrwrwrwwrwr.pptx
SQL ttrain wrwrwrw wwrw wwrrrwrwrwrwwrwr.pptx
antony194610
 
Think in linq
Think in linqThink in linq
Think in linq
Sudipta Mukherjee
 
Olap
OlapOlap
Olap
preksha33
 
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
Shahzad
 
The LINQ Between XML and Database
The LINQ Between XML and DatabaseThe LINQ Between XML and Database
The LINQ Between XML and Database
IRJET 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_iv
Nico 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_v
Nico 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#5
Peter Gfader
 

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)
 
SQL ttrain wrwrwrw wwrw wwrrrwrwrwrwwrwr.pptx
SQL ttrain wrwrwrw wwrw wwrrrwrwrwrwwrwr.pptxSQL ttrain wrwrwrw wwrw wwrrrwrwrwrwwrwr.pptx
SQL ttrain wrwrwrw wwrw wwrrrwrwrwrwwrwr.pptx
 
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
 

More from Vishwa Mohan

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

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)