Wednesday, 12 November 2008

Day 3 - 09:00 : Writing custom LINQ providers - LINQ to Anything (TLA317)

This session was presented by Bart J.F. De Smet, software development engineer from Microsoft, concentrating on the theory for writing your own data providers for LINQ.

He ran through the implementation of the open source implementation of LINQ to AD, allowing LINQ to query active directory using the LDAP language. The key principles revolved around implementing IQueryable, IQueryProvider and how expression trees are parsed and how lamda expressions are used in the context of Func<> and Expression<Func<>>.

Assigning lambdas as Func<> compile to IL code, whilst using Expression<Func<>> treats code as data, allowing it to be parsed through expression trees (with other LINQ query information) for transformation to another, external, language.

The session was supposed to be a 300 level session but, as the presenter pointed out, it was actually a 400+ session, covering very technical, in-depth topics at lightning speed. I leave further investigation as an exercise for the reader (and for me!), looking at the LINQ to AD or LINQ to sharepoint code for good examples of implementing custom providers.

No comments:

Post a Comment