LINQ to XML

The .NET Framework provided us with several techniques for accessing and  manipulating an XML file. In the past, you can use the XmlReader or the different XML Document Object Model classes such…

LINQ to SQL

LINQ to SQL is a powerful tool which allows developers to access databases as objects in C#. With LINQ to SQL, you are able to use LINQ query operators and methods…

LINQ Aggregate Methods

LINQ has aggregate operators or methods that allows you to perform mathematical calculations based on the values of all the elements in a collection. We will learn here the different aggregate operators…

LINQ Examples

Now that you have learnt some basic LINQ querying including how to select, filter, and order results of a query, let's take a look at more examples combining the concepts…

LINQ join Clause -Group Join

With the join clause, you can also do group  joins. A group join groups the items from the inner data source by their  corresponding item from the outer data source. For example,…

Joining Data Sources

There are times where you want to combine values from different data sources into just one result. Of course, those data sources must be related in some way. In LINQ,…

LINQ group by Clause

The group-by clause is used to group items  using a specified key. The group-by clause can be inserted between a from clause and a select clause or you can put a group-by clause as the final…

LINQ let Clause

The let clause allows you to store a result of  an expression inside a query expression and use it on the remaining part of the  query. A let clause is useful when the query…

LINQ orderby Clause

LINQ makes it straightforward for you to type or modify the order of the results of the question. We can use the orderby clause and specify that worth or property…

LINQ where Clause

You can filter the results of the query by using the where clause in a query expression. Following the where keyword is the condition (or conditions) that must be met by an item to…