SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 118 | Next

Scott Klein

"Professional LINQ"

For example, you can join a customer
database table and order database table, matching on equal keys from each side of the join.
59
Part I: Introduction to Project LINQ
In the following example, the join operator is used to join the Contact table to the Employee table using
the matching ContactID columns of each table.
from c in contact
join emp in employee on c.ContactID equals emp.ContactID
where c.FirstName.StartsWith("S")
orderby c.LastName
select new {emp.EmployeeID, c.FirstName, c.LastName,
c.EmailAddress, emp.Title, emp.HireDate}
Like relational database joins, joins can be performed on more than two sources. The preceding example
joins two tables or data sources, but you can just as easily join on more:
from c in contact
join emp in employee on c.ContactID equals emp.ContactID
join ind in individual on c.ContactID equals ind.ContactID
join cust in customer on ind.CustomerID equals cust.CustomerID
where c.FirstName.StartsWith("S")
orderby c.LastName
select new {emp.EmployeeID, c.FirstName, c.LastName, c.EmailAddress,
emp.


Pages:
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6