SlideShare a Scribd company logo
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:
Asp.net c# mvc Training-Day-5 of Day-9
 Into Keyword:
 Simple query:
 Multiple query:
191

More Related Content

PPTX
Asp.net c# MVC-5 Training-Day-2 of Day-9
PPTX
Asp.net c# mvc Training: Day-3 of Day-9
PPTX
Asp.net c# MVC-5 Training-Day-1 of Day-9
PPTX
Asp.net c# mvc Training Day-4 of Day-9
PDF
Generic repository pattern with ASP.NET MVC and Entity Framework
PDF
REPORT ON ASP.NET
PPS
Asp Architecture
PPTX
Asp.Net Core MVC with Entity Framework
Asp.net c# MVC-5 Training-Day-2 of Day-9
Asp.net c# mvc Training: Day-3 of Day-9
Asp.net c# MVC-5 Training-Day-1 of Day-9
Asp.net c# mvc Training Day-4 of Day-9
Generic repository pattern with ASP.NET MVC and Entity Framework
REPORT ON ASP.NET
Asp Architecture
Asp.Net Core MVC with Entity Framework

What's hot (20)

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

Viewers also liked (7)

PDF
Introdução ao Aspnet Core
PDF
Como funciona a Internet - Camada de Aplicação
PPTX
Internet x Web
PDF
ASP.NET MVC The Begining
PPSX
Asp.net mvc
PPT
The Internet Presentation
PPTX
Slideshare ppt
Introdução ao Aspnet Core
Como funciona a Internet - Camada de Aplicação
Internet x Web
ASP.NET MVC The Begining
Asp.net mvc
The Internet Presentation
Slideshare ppt
Ad

Similar to Asp.net c# mvc Training-Day-5 of Day-9 (20)

PPTX
SQL ttrain wrwrwrw wwrw wwrrrwrwrwrwwrwr.pptx
PPTX
LINQ PPT.pptx
DOCX
Project_Report (BARC-Jerin)_final
PPTX
Understanding LINQ in C#
DOCX
Linq in C#
PPTX
C# advanced topics and future - C#5
PDF
New c sharp3_features_(linq)_part_iv
PDF
In your own words, what exactly is Language-Integrated Query (LINQ).pdf
PDF
The LINQ Between XML and Database
PPTX
Linq view part1
PPT
Linq
PPT
.Net overview
PDF
Asp.Net 3.5 Part 2
PPTX
Consuming Data with F# Type Providers
PPT
.Net framework
PPT
Linq presentation by vaidhesh
PPT
.Net Overview -- Training (Lesson 1)
PPT
.Net overview|Introduction Of .net
PPT
Visual studio
SQL ttrain wrwrwrw wwrw wwrrrwrwrwrwwrwr.pptx
LINQ PPT.pptx
Project_Report (BARC-Jerin)_final
Understanding LINQ in C#
Linq in C#
C# advanced topics and future - C#5
New c sharp3_features_(linq)_part_iv
In your own words, what exactly is Language-Integrated Query (LINQ).pdf
The LINQ Between XML and Database
Linq view part1
Linq
.Net overview
Asp.Net 3.5 Part 2
Consuming Data with F# Type Providers
.Net framework
Linq presentation by vaidhesh
.Net Overview -- Training (Lesson 1)
.Net overview|Introduction Of .net
Visual studio

More from AHM Pervej Kabir (12)

PPTX
Business Analysis.pptx
PPT
Knowledge share about scalable application architecture
PPT
Software security engineering
PPT
Software security engineering
PPT
Shot note about project management
PDF
Data Collection From Field
PDF
Automated Survey Data Received and Sync From Field
PDF
Automated Survey Question Creator Management
PPTX
Presentation
DOC
Reporting about Overview Summery of ISO-27000 Se.(ISMS)
Business Analysis.pptx
Knowledge share about scalable application architecture
Software security engineering
Software security engineering
Shot note about project management
Data Collection From Field
Automated Survey Data Received and Sync From Field
Automated Survey Question Creator Management
Presentation
Reporting about Overview Summery of ISO-27000 Se.(ISMS)

Recently uploaded (20)

PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
medical staffing services at VALiNTRY
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PPTX
L1 - Introduction to python Backend.pptx
PDF
Complete React Javascript Course Syllabus.pdf
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
ISO 45001 Occupational Health and Safety Management System
PDF
PTS Company Brochure 2025 (1).pdf.......
PPT
JAVA ppt tutorial basics to learn java programming
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PPTX
Essential Infomation Tech presentation.pptx
PDF
AI in Product Development-omnex systems
PPTX
Materi-Enum-and-Record-Data-Type (1).pptx
PPT
Introduction Database Management System for Course Database
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
Online Work Permit System for Fast Permit Processing
PDF
Digital Strategies for Manufacturing Companies
ManageIQ - Sprint 268 Review - Slide Deck
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
medical staffing services at VALiNTRY
How to Migrate SBCGlobal Email to Yahoo Easily
L1 - Introduction to python Backend.pptx
Complete React Javascript Course Syllabus.pdf
2025 Textile ERP Trends: SAP, Odoo & Oracle
Design an Analysis of Algorithms II-SECS-1021-03
ISO 45001 Occupational Health and Safety Management System
PTS Company Brochure 2025 (1).pdf.......
JAVA ppt tutorial basics to learn java programming
Upgrade and Innovation Strategies for SAP ERP Customers
Essential Infomation Tech presentation.pptx
AI in Product Development-omnex systems
Materi-Enum-and-Record-Data-Type (1).pptx
Introduction Database Management System for Course Database
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Online Work Permit System for Fast Permit Processing
Digital Strategies for Manufacturing Companies

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:
  • 17.  Into Keyword:  Simple query:
  • 19. 191