Project LINQ – Language INtegrated Query (by yag)

Well, the hints have been going out for a while now, and finally we can talk about this thing we've been working on for so long. At the PDC opening keynote today, we unveiled a number of things including Project LINQ. The Language Integrated Query framework (the LINQ Project) is a set of language extensions to C# and VB and a unified programming model that extends the .NET Framework to offer integrated querying for objects, databases and XML. Basically, instead of writing your queries in strings, you can now do them directly in the language of your choice.

Let's take a look at a simple code sample. Let's say there's a collection of Country objects called Countries. You can now get all countries with a population ofless than 1 million with a SQL-like syntax

Dim SmallCountries = Select Country _
From Country In Countries _
Where Country.Population < 1000000

The great thing about this is that it works over database data, XML or objects (anything that is IEnumerable). So, for those of you used to, for instance, Fox - though the syntax is familiar, the capabilities are much further reaching in your daily programming.

There will be a lot of blog posts by members of the C#, VB and various data teams all about this. Also, starting on Wednesday (depending on MSDN scheduling) there will be bits that can be downloaded to test this out. I'll be modifying this entry through the course of the day (or, more likely, night) to point to other blog entries on this topic.

Boy it's nice to be able to show this publicly now!

Comments (6)
  1. Have you seen the buzz about the Visual Basic Futures that

    have been announced today?


  2. Normally I don’t like to make entries that are just a collection of links, but this time I will make…

  3. AlexSosa says:

    Glad to see that VB will include many traits that made VFP shine:

    1) Ability to write SQL statements directly (no quotes required) with all that implies. Be thoughtful when you define the syntax: consider using ANSI SQL as your guide.

    2) Focus on developer productivity, not theoretical purity, but with sound design.

    3) Dynamic language capabilities. I understand that at present this means late binding but I hope it may lead to macros or, better yet, the capability to generate code, save, compile, and run.

    4) A command box. A true "killer app".

    5) I would prefer to see VFP extended to easily write internet apps, but I am ready to embrace alternatives.

Comments are closed.

Skip to main content