Geeks With Blogs

News Dave's Mug View David Oliver's profile on LinkedIn Add to Technorati Favorites Blog Directory for Guildford, Surrey
Dave Oliver's Blog Enterprise Technology Thought Leadership in a FTSE 100

News coming out of the PDC about an exciting new a set of standard query operators for use in working with data regardless of the data source!

In essence they are a set of .net libraries that will extend C# and Visual Basic, from the examples on Microsoft site there is a strong impression that this is a sort of SQL type addition to the languages, that still happily works in a OO fashion.

For example extracted from the Microsoft website.

Where - Simple 1

This sample prints each element of an input integer array whose value is less than 5. The sample uses a query expression to create a new sequence of integers and then iterates over each element in the sequence, printing its value.

public void Linq1() {
    int[] numbers = { 5, 4, 1, 3, 9, 8, 6, 7, 2, 0 };

    var lowNums =
        from n in numbers
        where n < 5
        select n;

    Console.WriteLine("Numbers < 5:");
    foreach (var x in lowNums) {

Numbers < 5:

This is very exciting because it allows developers a consistency when dealing with any data-source. The hope is that the days of a different sets of code for Oracle, Sybase, SQL Server et al so we can get to a really uniform DAL (Database Access Layer) are here.

The Microsoft LINQ website can be found here.

The question I haven't quite found the answer for yet is will LINQ work on the new version of .Net Mobile?

Anyway, for now eat your heart out Java!


Posted on Wednesday, September 14, 2005 5:52 PM | Back to top

Comments on this post: What is LINQ?

Comments are closed.
Comments have been closed on this topic.
Copyright © Dave Oliver | Powered by: