Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Latest commit

 

History

History
35 lines (20 loc) · 1.4 KB

join-operators.md

File metadata and controls

35 lines (20 loc) · 1.4 KB

LINQ - Join operations

Learn to use cross join, group join, and left outer join operations in LINQ queries

Cross join

This sample shows how to efficiently join elements of two sequences based on equality between key expressions over the two.

Group join

Using a group join you can get all the products that match a given category bundled as a sequence.

Cross join with group join

The group join operator is more general than join, as this slightly more verbose version of the cross join sample shows.

Left outer join using group join

A so-called outer join can be expressed with a group join. A left outer join is like a cross join, except that all the left hand side elements get included at least once, even if they don't match any right hand side elements. Note how Vegetables shows up in the output even though it has no matching products.

Previous: Query execution »

Home