dive into linq
ivan towlsonmindscape
imagine there’s no sql
Objects
XML
Relational
Objects
XML
Relational
Web Services
NoSQL
Objects
XML
Relational
Web Services
NoSQL
WMI
Email
Objects
XML
Relational
Web Services
NoSQL
WMI
Email
three worlds…for large values of three
“queries should just ‘be there,’like for loops”
anders hejlsberg
linqlanguage integrated query
language syntax
standard query operators
query implementation framework
language syntax
standard query operators
query implementation framework
putting the lin into linq
LINQ…
…to Objects
IEnumerable
…to XML
XDocumentfamily
…to SQL
Table<T>SQL Server
language syntax
standard query operators
query implementation framework
language syntax
standard query operators
query implementation framework
when syntax runs out
everything is query operators
language syntax
standard query operators
query implementation framework
language syntax
standard query operators
query implementation framework
I plan to query overONE… MILLION… OBJECTS!
what is the meaning ofx.Select(…)?
what is the meaning ofx.Select(…)?
IEnumerable<T> x;
IQueryable<T> x;
what is the meaning ofx.Select(…)?
IEnumerable<T> x;Enumerable.Select(x, …)
IQueryable<T> x;Queryable.Select(x, …)
IQueryable<T> x;Queryable.Select(x, …)
Table<T> x;Queryable.Select(x, …)
Queryable
IQueryProvider
SQL Entities LightSpeed NH ….
Queryable
IQueryProvider
SQL Entities LightSpeed NH ….
Queryable
IQueryProvider
SQL Entities LightSpeed NH ….
Expression tree
IQueryable
.Provider
Native query
xs.Where(…).Select(…) Table<X>
SELECT …FROM X
WHERE …
linq to sql
xs.Where(…).Select(…) Query<X> Find<X>(qx)
linq to lightspeed
xs.Where(…).Select(…) WmiQuery<X> WqlObjectQuery
linq to wmi
Expression tree
IQueryable
.Provider
Native query
language syntax
standard query operators
query implementation framework
language syntax
standard query operators
query implementation framework
what is a query?extract, transform and load
what is a query?‘what am i interested in’
i am interested in…drag and drop
i am interested in…a mouse down
followed by mouse movesuntil i get a mouse up
Objects
XML
Relational
almost
anything
actually
…
Objects
XML
Relational
almost
anything
actually
…
“queries should just ‘be there,’like for loops”
anders hejlsberg