TechnicalArchitectureWorx

The (Unofficial) ITWorx Technical Architecture Blog

LINQ: The Technology of the Future

Posted by archworx on February 7, 2007

Yesterday I attended a session on Language Integrated Query (LINQ) at MDC. Simply said it is a new technology introduced with C# 3.0 and VB 9.0 which will be shipped in the next version (Orcas) of Visual Studio. Basically, LINQ allows you to perform queries on objects, databases and XML files from within .NET languages allowing you, for example, to query your database without writing a single line of SQL code. LINQ helps you create an object mapping of your database; converting your database tables into classes which you can query from within the language. This way you can reap the advantages of Intellisense and Type Checking which were never present when you wrote SQL strings from inside the code. Below are screenshots containing the code I wrote to perform a query on the Northwind database that retrieves the customerID of customers who live in London and the results obtained from the query. It is important to mention that prior to performing this query , I used a visual designer (included with LINQ) to drag the database tables on screen, allowing LINQ to convert them into the corresponding objects.

N.B. I am using the May CTP of LINQ.LINQ Code

LINQ ScreenShot

Advertisements

2 Responses to “LINQ: The Technology of the Future”

  1. archworx said

    I have a question about this – what are the caveats associated with the use of such a technology with clients or platforms that are based on older releases of .NET, such as 1.1 or 2.0. In other words, is this a technology which is production ready yet, or do I have to wait a while?

  2. Ahmed Fathalla said

    From my humble deduction skills I guess the use of the word “caveats” points to our dearest friend MKaram (simply because he is the only one who ever uses this word). My understanding is NO, the technology is not production ready yet, it will be mature with the next release of Visual Studio (Orcas), which by the way Mr. Calvert refused to tell me its exact date of release. Furthermore, even in the demos given during the session there were no examples of using LINQ in a Web environment. Thus, we can conclude that we will not use LINQ in production environments in 2007 at least in my opinion. On the other hand, I think this is a revolutaionary idea which is certainly the most innovative I have seen from Microsoft in a long time. It will simply change the way we develop our code.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: