Page 1
dive into linq
ivan towlsonmindscape
Page 2
imagine there’s no sql
Page 4
Objects
XML
Relational
Page 5
Objects
XML
Relational
Web Services
NoSQL
Page 6
Objects
XML
Relational
Web Services
NoSQL
WMI
Email
Page 7
Objects
XML
Relational
Web Services
NoSQL
WMI
Email
three worlds…for large values of three
Page 8
“queries should just ‘be there,’like for loops”
anders hejlsberg
Page 9
linqlanguage integrated query
Page 10
language syntax
standard query operators
query implementation framework
Page 11
language syntax
standard query operators
query implementation framework
Page 12
putting the lin into linq
Page 13
LINQ…
…to Objects
IEnumerable
…to XML
XDocumentfamily
…to SQL
Table<T>SQL Server
Page 15
language syntax
standard query operators
query implementation framework
Page 16
language syntax
standard query operators
query implementation framework
Page 17
when syntax runs out
Page 18
everything is query operators
Page 19
language syntax
standard query operators
query implementation framework
Page 20
language syntax
standard query operators
query implementation framework
Page 21
I plan to query overONE… MILLION… OBJECTS!
Page 22
what is the meaning ofx.Select(…)?
Page 23
what is the meaning ofx.Select(…)?
IEnumerable<T> x;
IQueryable<T> x;
Page 24
what is the meaning ofx.Select(…)?
IEnumerable<T> x;Enumerable.Select(x, …)
IQueryable<T> x;Queryable.Select(x, …)
Page 25
IQueryable<T> x;Queryable.Select(x, …)
Page 26
Table<T> x;Queryable.Select(x, …)
Page 27
Queryable
IQueryProvider
SQL Entities LightSpeed NH ….
Page 28
Queryable
IQueryProvider
SQL Entities LightSpeed NH ….
Page 29
Queryable
IQueryProvider
SQL Entities LightSpeed NH ….
Page 30
Expression tree
IQueryable
.Provider
Native query
Page 31
xs.Where(…).Select(…) Table<X>
SELECT …FROM X
WHERE …
linq to sql
Page 32
xs.Where(…).Select(…) Query<X> Find<X>(qx)
linq to lightspeed
Page 33
xs.Where(…).Select(…) WmiQuery<X> WqlObjectQuery
linq to wmi
Page 34
Expression tree
IQueryable
.Provider
Native query
Page 35
language syntax
standard query operators
query implementation framework
Page 36
language syntax
standard query operators
query implementation framework
Page 39
what is a query?extract, transform and load
Page 40
what is a query?‘what am i interested in’
Page 41
i am interested in…drag and drop
Page 42
i am interested in…a mouse down
followed by mouse movesuntil i get a mouse up
Page 43
Objects
XML
Relational
almost
anything
actually
…
Page 44
Objects
XML
Relational
almost
anything
actually
…
“queries should just ‘be there,’like for loops”
anders hejlsberg