LINQ Tutorials

How to use LINQ Take clause in VB.NET

Web developers use optional LINQ Take clause when they want to include in a query a specified number of contiguous elements from the start of a result list which is specified by the count parameter:

Take count

where count is required value or an expression that evaluates to the number of elements of the sequence to return.

Learn more

How to use LINQ Skip While clause in VB.NET

Web developers use optional LINQ Skip While clause to bypass elements from the beginning of a query result until the supplied expression returns false. After expression returns false, the query returns all the remaining elements and the expression is ignored for the remaining result.

The Skip While clause can be used to exclude elements from …

Learn more

How to use LINQ Skip clause in VB.NET

Web developers use optional LINQ Skip clause when they want to bypass, specified by the count parameter, elements at the beginning of a results list and return the remaining elements. Web developers can combine the Skip clause with the Take clause to return a range of data from any segment of a query, by passing the …

Learn more

How to use LINQ Distinct clause in VB.NET

Web developers use optional LINQ Distinct clause when they want to receive a list of unique items. The Distinct clause ignores duplicate query results and can be applied to duplicate values for all return fields specified by the Select clause. If no Select clause is specified, the Distinct clause is applied to the range variable for the query …

Learn more

How to use LINQ Let clause in VB.NET

Web developers can use optional LINQ Let clause to compute values for each query result and reference them by using an alias. The alias can be used in other clauses, such as the Where clause. By using Let clause, Web developers can create a query statement that is easier to read because they can specify an alias for …

Learn more

How to use LINQ multiple joins

Web developers use LINQ join clause when they want to associate elements from different source sequences that have no direct relationship in the object model. For example, an electronic devices distributor might have a list of suppliers of a certain product, and a list of buyers. A join clause can be used, for example, to create a list …

Learn more

How to use LINQ inner join clause based on a composite key

Web developer uses LINQ join clause when he/she wants to associate elements from different source sequences that have no direct relationship in the object model. For example, an electronic devices distributor might have a list of suppliers of a certain product, and a list of buyers. A join clause can be used, for example, to create a list …

Learn more

How to use LINQ inner join clause based on a simple key

Web developers use LINQ join clause when he/she wants to associate elements from different source sequences that have no direct relationship in the object model. For example, an electronic devices distributor might have a list of suppliers of a certain product, and a list of buyers. A join clause can be used, for example, to create a list …

Learn more

How to use LINQ group clause to group results in VB.NET

Web developer can use LINQ group clause to group his/her results based on a key that he/she specifies. For example Web developer could specify that the results should be grouped by the City so that all clients from New York or San Francisco are in individual groups. In this case client.City is the key.

 

Dim qryClientsByCity = From client …

Learn more

How to use LINQ group clause to group results in C#

Web developers can use LINQ group clause to group their results based on a key that they specify. For example Web developers could specify that the results should be grouped by the City so that all clients from New York or San Francisco are in individual groups. In this case client.City is the key.

 

var qryClientsByCity =

from …

Learn more