-
Notifications
You must be signed in to change notification settings - Fork 0
/
6-9 Join.linq
35 lines (30 loc) · 1.47 KB
/
6-9 Join.linq
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<Query Kind="Statements">
<Connection>
<ID>b5bf0f26-eb4d-481f-aab0-d1d516538992</ID>
<Persist>true</Persist>
<Server>.\SQLEXPRESS</Server>
<AttachFile>true</AttachFile>
<UserInstance>true</UserInstance>
<AttachFileName>L:\Downloads\northwind\NORTHWND.mdf</AttachFileName>
</Connection>
<Reference Relative="..\RxBookLinqpadHelper\ext\System.Reactive.dll">D:\ProgrammingRx\Demo Code For Chapters\RxBookLinqpadHelper\ext\System.Reactive.dll</Reference>
<Reference Relative="..\RxBookLinqpadHelper\ext\Microsoft.Reactive.Testing.dll">D:\ProgrammingRx\Demo Code For Chapters\RxBookLinqpadHelper\ext\Microsoft.Reactive.Testing.dll</Reference>
<Reference Relative="..\RxBookLinqpadHelper\RxBookLinqpadHelper\bin\Debug\RxBookLinqpadHelper.dll">D:\ProgrammingRx\Demo Code For Chapters\RxBookLinqpadHelper\RxBookLinqpadHelper\bin\Debug\RxBookLinqpadHelper.dll</Reference>
<Namespace>System.Reactive</Namespace>
<Namespace>System.Reactive.Linq</Namespace>
<Namespace>Microsoft.Reactive.Testing</Namespace>
<Namespace>RxBookLinqpadHelper</Namespace>
<Namespace>System.Reactive.Concurrency</Namespace>
</Query>
DataContext dataContext = this;
var orders = dataContext.GetTable<Orders>();
var customers = dataContext.GetTable<Customers>();
var query = from order in orders join customer in customers
on order.CustomerID equals customer.CustomerID
select new
{
order.OrderDate,
customer.CompanyName,
customer.PostalCode
};
query.Dump();