SlideShare uma empresa Scribd logo
1 de 19
AHM Pervej Kabir
Analyst Programmer
pervej_kabir@yahoo.com
Cell:+8801757051005 Day-5: 18 October 2017
ASP.Net C#- MVC-5 Training
Introduction
 What is LINQ?
Why LINQ?
LINQ Query & Method Syntax
Anatomy of the Lambda Expression
Standard Query Operators:
Expression in LINQ
Expression Tree
Immediate Execution of LINQ Query
let & into keyword
Sample LINQ Queries
 What Is LINQ
LINQ (Language Integrated Query) is uniform query syntax in C# and VB.NET used to save and retrieve data from
different sources. It is integrated in C# or VB, thereby eliminating the mismatch between programming languages and
databases, as well as providing a single querying interface for different types of data sources.
 For example, SQL is a Structured Query Language used to save and retrieve data from a database. In the same
way, LINQ is a structured query syntax built in C# and VB.NET used to save and retrieve data from different types
of data sources like an Object Collection, SQL server database, XML, web service etc.
 LINQ always works with objects so you can use the same basic coding patterns to query and transform data in
XML documents, SQL databases, ADO.NET Datasets, .NET collections, and any other format for which a LINQ
provider is available.
 Why LINQ?
 Familiar language: Developers don’t have to learn a new query language for each type of
data source or data format.
 Less coding: It reduces the amount of code to be written as compared with a more
traditional approach.
 Readable code: LINQ makes the code more readable so other developers can easily
understand and maintain it.
 Standardized way of querying multiple data sources: The same LINQ syntax can be
used to query multiple data sources.
 Compile time safety of queries: It provides type checking of objects at compile time.
 IntelliSense Support: LINQ provides IntelliSense for generic collections.
 Shaping data: You can retrieve data in different shapes.
 LINQ Query Syntax:
Example:
Example:
LINQ Method Syntax:
C# 3.0(.NET 3.5) introduced the lambda expression along with LINQ.
Example:
Lamda Expression:
 Standard Query Operators in query
 Standard Query Operators in Method
 Where Clause:
 Where Extension Method:
 Then By:
 Group By:
 Joining
 Aggregate Function:
 Concatenation
 Skip
 Expression:
 Invoke an Expression:
 Into Keyword:
 Simple query:
 Multiple query:
191

Mais conteúdo relacionado

Mais procurados

Instagram filters (8 24)
Instagram filters (8 24)Instagram filters (8 24)
Instagram filters (8 24)
Ivy Rueb
 

Mais procurados (20)

Be project ppt asp.net
Be project ppt asp.netBe project ppt asp.net
Be project ppt asp.net
 
ASP.NET - Ivan Marković
ASP.NET - Ivan MarkovićASP.NET - Ivan Marković
ASP.NET - Ivan Marković
 
Building Information Systems with MERN
Building Information Systems with MERNBuilding Information Systems with MERN
Building Information Systems with MERN
 
2310 b 01
2310 b 012310 b 01
2310 b 01
 
Dependency injection presentation
Dependency injection presentationDependency injection presentation
Dependency injection presentation
 
Intro to PHP
Intro to PHPIntro to PHP
Intro to PHP
 
Introduction to asp.net
Introduction to asp.netIntroduction to asp.net
Introduction to asp.net
 
Web development using asp.net
Web development using asp.netWeb development using asp.net
Web development using asp.net
 
Scott Schuster Portfolio 04262011
Scott Schuster Portfolio 04262011Scott Schuster Portfolio 04262011
Scott Schuster Portfolio 04262011
 
Product Camp Silicon Valley 2018 - PM Technical Skills
Product Camp Silicon Valley 2018 - PM Technical SkillsProduct Camp Silicon Valley 2018 - PM Technical Skills
Product Camp Silicon Valley 2018 - PM Technical Skills
 
Asp.net and .Net Framework ppt presentation
Asp.net and .Net Framework ppt presentationAsp.net and .Net Framework ppt presentation
Asp.net and .Net Framework ppt presentation
 
Code igniter overview
Code igniter overviewCode igniter overview
Code igniter overview
 
Everything you need to know about mern stack programming
Everything you need to know about mern stack programmingEverything you need to know about mern stack programming
Everything you need to know about mern stack programming
 
Combining react with node js to develop successful full stack web applications
Combining react with node js to develop successful full stack web applicationsCombining react with node js to develop successful full stack web applications
Combining react with node js to develop successful full stack web applications
 
Instagram filters (8 24)
Instagram filters (8 24)Instagram filters (8 24)
Instagram filters (8 24)
 
What's new in visual studio 2013
What's new in visual studio 2013What's new in visual studio 2013
What's new in visual studio 2013
 
Asp.net
Asp.netAsp.net
Asp.net
 
Client side scripting and server side scripting
Client side scripting and server side scriptingClient side scripting and server side scripting
Client side scripting and server side scripting
 
Introduction to asp.net
Introduction to asp.netIntroduction to asp.net
Introduction to asp.net
 
Microsoft for developers open source and cross platform
Microsoft for developers  open source and cross platformMicrosoft for developers  open source and cross platform
Microsoft for developers open source and cross platform
 

Destaque (7)

Introdução ao Aspnet Core
Introdução ao Aspnet CoreIntrodução ao Aspnet Core
Introdução ao Aspnet Core
 
Como funciona a Internet - Camada de Aplicação
Como funciona a Internet - Camada de AplicaçãoComo funciona a Internet - Camada de Aplicação
Como funciona a Internet - Camada de Aplicação
 
Internet x Web
Internet x WebInternet x Web
Internet x Web
 
ASP.NET MVC The Begining
ASP.NET MVC The BeginingASP.NET MVC The Begining
ASP.NET MVC The Begining
 
Asp.net mvc
Asp.net mvcAsp.net mvc
Asp.net mvc
 
The Internet Presentation
The Internet Presentation The Internet Presentation
The Internet Presentation
 
Slideshare ppt
Slideshare pptSlideshare ppt
Slideshare ppt
 

Semelhante a Asp.net c# mvc Training-Day-5 of Day-9

Project_Report (BARC-Jerin)_final
Project_Report (BARC-Jerin)_finalProject_Report (BARC-Jerin)_final
Project_Report (BARC-Jerin)_final
Jerin John
 
Consuming Data with F# Type Providers
Consuming Data with F# Type ProvidersConsuming Data with F# Type Providers
Consuming Data with F# Type Providers
Rachel Reese
 
.Net Overview -- Training (Lesson 1)
.Net Overview -- Training (Lesson 1).Net Overview -- Training (Lesson 1)
.Net Overview -- Training (Lesson 1)
Rishi Kothari
 

Semelhante a Asp.net c# mvc Training-Day-5 of Day-9 (20)

LINQ PPT.pptx
LINQ PPT.pptxLINQ PPT.pptx
LINQ PPT.pptx
 
Project_Report (BARC-Jerin)_final
Project_Report (BARC-Jerin)_finalProject_Report (BARC-Jerin)_final
Project_Report (BARC-Jerin)_final
 
Understanding LINQ in C#
Understanding LINQ in C# Understanding LINQ in C#
Understanding LINQ in C#
 
Linq in C#
Linq in C#Linq in C#
Linq in C#
 
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
 
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
 
In your own words, what exactly is Language-Integrated Query (LINQ).pdf
In your own words, what exactly is Language-Integrated Query (LINQ).pdfIn your own words, what exactly is Language-Integrated Query (LINQ).pdf
In your own words, what exactly is Language-Integrated Query (LINQ).pdf
 
The LINQ Between XML and Database
The LINQ Between XML and DatabaseThe LINQ Between XML and Database
The LINQ Between XML and Database
 
Linq
LinqLinq
Linq
 
Linq view part1
Linq view part1Linq view part1
Linq view part1
 
Linq
LinqLinq
Linq
 
.Net overview
.Net overview.Net overview
.Net overview
 
Asp.Net 3.5 Part 2
Asp.Net 3.5 Part 2Asp.Net 3.5 Part 2
Asp.Net 3.5 Part 2
 
Consuming Data with F# Type Providers
Consuming Data with F# Type ProvidersConsuming Data with F# Type Providers
Consuming Data with F# Type Providers
 
.Net framework
.Net framework.Net framework
.Net framework
 
Linq presentation by vaidhesh
Linq presentation by vaidheshLinq presentation by vaidhesh
Linq presentation by vaidhesh
 
.Net Overview -- Training (Lesson 1)
.Net Overview -- Training (Lesson 1).Net Overview -- Training (Lesson 1)
.Net Overview -- Training (Lesson 1)
 
.Net overview|Introduction Of .net
.Net overview|Introduction Of .net.Net overview|Introduction Of .net
.Net overview|Introduction Of .net
 
Visual studio
Visual studioVisual studio
Visual studio
 
Overview of microsoft dot net platforms
Overview of microsoft dot net platformsOverview of microsoft dot net platforms
Overview of microsoft dot net platforms
 

Mais de AHM Pervej Kabir (12)

Business Analysis.pptx
Business Analysis.pptxBusiness Analysis.pptx
Business Analysis.pptx
 
Knowledge share about scalable application architecture
Knowledge share about scalable application architectureKnowledge share about scalable application architecture
Knowledge share about scalable application architecture
 
Software security engineering
Software security engineeringSoftware security engineering
Software security engineering
 
Software security engineering
Software security engineeringSoftware security engineering
Software security engineering
 
Shot note about project management
Shot note about project managementShot note about project management
Shot note about project management
 
CMMI
CMMICMMI
CMMI
 
Agile
AgileAgile
Agile
 
Data Collection From Field
Data Collection From FieldData Collection From Field
Data Collection From Field
 
Automated Survey Data Received and Sync From Field
Automated Survey Data Received and Sync From FieldAutomated Survey Data Received and Sync From Field
Automated Survey Data Received and Sync From Field
 
Automated Survey Question Creator Management
Automated Survey Question Creator ManagementAutomated Survey Question Creator Management
Automated Survey Question Creator Management
 
Presentation
PresentationPresentation
Presentation
 
Reporting about Overview Summery of ISO-27000 Se.(ISMS)
Reporting about Overview Summery  of ISO-27000 Se.(ISMS)Reporting about Overview Summery  of ISO-27000 Se.(ISMS)
Reporting about Overview Summery of ISO-27000 Se.(ISMS)
 

Último

AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 

Último (20)

Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 

Asp.net c# mvc Training-Day-5 of Day-9

  • 1. AHM Pervej Kabir Analyst Programmer pervej_kabir@yahoo.com Cell:+8801757051005 Day-5: 18 October 2017 ASP.Net C#- MVC-5 Training
  • 2. Introduction  What is LINQ? Why LINQ? LINQ Query & Method Syntax Anatomy of the Lambda Expression Standard Query Operators: Expression in LINQ Expression Tree Immediate Execution of LINQ Query let & into keyword Sample LINQ Queries
  • 3.  What Is LINQ LINQ (Language Integrated Query) is uniform query syntax in C# and VB.NET used to save and retrieve data from different sources. It is integrated in C# or VB, thereby eliminating the mismatch between programming languages and databases, as well as providing a single querying interface for different types of data sources.  For example, SQL is a Structured Query Language used to save and retrieve data from a database. In the same way, LINQ is a structured query syntax built in C# and VB.NET used to save and retrieve data from different types of data sources like an Object Collection, SQL server database, XML, web service etc.  LINQ always works with objects so you can use the same basic coding patterns to query and transform data in XML documents, SQL databases, ADO.NET Datasets, .NET collections, and any other format for which a LINQ provider is available.
  • 4.  Why LINQ?  Familiar language: Developers don’t have to learn a new query language for each type of data source or data format.  Less coding: It reduces the amount of code to be written as compared with a more traditional approach.  Readable code: LINQ makes the code more readable so other developers can easily understand and maintain it.  Standardized way of querying multiple data sources: The same LINQ syntax can be used to query multiple data sources.  Compile time safety of queries: It provides type checking of objects at compile time.  IntelliSense Support: LINQ provides IntelliSense for generic collections.  Shaping data: You can retrieve data in different shapes.
  • 5.  LINQ Query Syntax: Example:
  • 7. C# 3.0(.NET 3.5) introduced the lambda expression along with LINQ. Example: Lamda Expression:
  • 8.  Standard Query Operators in query  Standard Query Operators in Method
  • 9.  Where Clause:  Where Extension Method:
  • 10.  Then By:  Group By:
  • 15.  Invoke an Expression:
  • 16.
  • 17.  Into Keyword:  Simple query:
  • 19. 191