Join Two Sequences with join
When working with databases, it is common to want to create a sequence that correlates
data from two different data sources. For example, an online store might have one database
that associates the name of an item with its item number, and a second database that
associates the item number with its in-stock status. Given this situation, you might want to
generate a list that shows the in-stock status of items by name, rather than by item number.
You can do this by correlating the data in the two databases. Such an action is easy to
accomplish in LINQ through the use of the
join
clause.
The general form of
Do'stlaringiz bilan baham: |