The document discusses LINQ (Language Integrated Query), which provides a uniform query syntax in C# and VB.NET to retrieve data from different sources. LINQ allows querying of objects, XML documents, SQL databases, and other data formats using the same basic coding patterns. It offers benefits like a familiar language, less coding, readable code, standardized querying across sources, compile-time type safety, and IntelliSense support. The document covers LINQ query syntax, method syntax using lambda expressions, standard query operators like Where, OrderBy, GroupBy, Join, and Aggregate functions. Examples are provided of LINQ queries and expression trees.
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.