Tales from a Trading Desk

Noise from an Investment Bank

LINQ

It was excellent to see Microsoft refresh the LINQ Tech Preview for VS 2005 RTM.  LINQ is cool technology.  The only downside today is that fact that we will probably have to wait 1+ years to see it released as part of VS 2006-7.

        class Employee
        {
            public Employee(String name, String location)
            {
                this.name = name;
                this.location = location;
            }
            public string name;
            public string location;
        }


            List<Employee> employees = new List<Employee>();
            employees.Add(new Employee("Fred", "LDN"));
            employees.Add(new Employee("Bob", "NY"));

            var nys =
                from e in employees
                where e.location == "NY"
                select e;

            foreach (var names in nys) {
                Console.WriteLine(names.name);
            }

Samples from Microsoft are available here

Posted: Nov 06 2005, 07:19 AM by mdavey | with 1 comment(s)
Filed under:

Comments

Javier Luna said:

Nice post Davey.

I have developed a Business Layer on DLinq to obtain an object model strongly typed.

Using Dictionary<U, V> to collections and business classes to Atoms namespace.

Business Layer on DLinq
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=112382

I have used a simple database struct: Users and Groups to show many-to-many support.

Good coding.

Javier Luna
http://guydotnetxmlwebservices.blogspot.com/
# November 6, 2005 6:34 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)