Posted By: Beth Massi | Jul 21st @ 10:13 PM | 54,771 Views | 10 Comments
Ever wonder what really happens when you write a simple LINQ query? A lot of new language features went into the compilers in Visual Studio 2008 to make LINQ work. In this interview I sit down with Jonathan Aneja, a Program Manager on the Visual Basic Compiler team, who dives deep into these features like Type Inference, Anonymous Types, Lambda Expressions, Expressions Trees, and more. He explains what's actually happening behind the scenes and all the work the compiler is doing for you when you write a LINQ query. My head almost explodes at the end but I learned a lot of important concepts. Wink

Check out Jonathan on the VB Team Blog.

Enjoy,
-Beth Massi, Visual Studio Community
Rating:
2
0

Although I use c# for my programming, it was amazing lucid and easy to follow Jonathan.

It really gives a wonderful overview of what happens  behind the scenes when you write a LINQ statement, and at the same time introduces the user to the new features of .net framework 3.5.

I liked it soo much that I have downloaded it and would be sharing it with other team members,

Thanks for the presentation,

Cheers,

Charles
Charles
Welcome Change

Agreed. Really good stuff here. Thanks, Beth and Jonathan!

 

C

figuerres
figuerres
???

As far as i see it linq is one of the best things to happen to .net since .net V1

in my handheld apps I use linq and a binary serializer plus some classes that share an interface to be a kind of "mini-database"

beeing able to combine LINQ with Generics and the typed collections is just sweet!

and on the CE devices i can store most of the data and just keep a small list in-memory to re-load the object when needed.

I have about 80 mobile devices in use right now...  and the customer just keeps asking us to pack in more features.

Jonathan explains some newish VB concepts in a palatable way. Thanks for not exploding my head. Here's a linky that was mentioned for easy access: http://blogs.msdn.com/vbteam/archive/2007/08/29/implementing-dynamic-searching-using-linq.aspx

I love watching other developers work with LINQ.   You always pick up something you didn't know.    Good video.

Kaushal Gajjar
Kaushal Gajjar
Kaushal

Great overview! 

 

Learning from this video is much easier then browsing msdn documents.

Kaushal Gajjar
Kaushal Gajjar
Kaushal

I am wondering what would be the correct way of giving a specific datatype to IQuariable of Anynomous using  "WITH". For example:

 

 Dim Contacts = From C In PracticeDB.Contacts _ 

Select New With {.ID = C.ID, .Name = C.Name}

 

 Dim Query = New With {.ID = 1, .Name = "Kaushal"}

 

In above both query it has "ID" and "Name" property of anonymous type.

 

In above, How to specify "ID" property as Decimal? While selecting the statement from DataContext ID appears as Decimal because the type specified is "Numeric" in SQL Database.

 

So far I found a way by parsing data type to integer in first query as following:

 

Dim Contacts = From C In PracticeDB.Contacts _ 

Select New With {.ID = Integer.Parse(C.ID), .Name = C.Name}

 

 Dim Query = New With {.ID = 1, .Name = "Kaushal"}

 

I am wondering if there is any way to specify within WITH Statement.

 

 

Thanks Really good stuff   شات

Microsoft Communities