Fabrice's weblog

Tools and Source

News

My .NET Toolbox
An error occured. See the script errors signaled by your web browser.
No tools selected yet
.NET tools by SharpToolbox.com

Read sample chapters or buy LINQ in Action now!
Our LINQ book is also available on AMAZON

.NET jobs

Emplois .NET

Tuneo

ASP.NET Hosting transatlantys

Contact

Me

Others

Selected content

Archives

December 2006 - Posts

LINQ to Objects for JavaScript

Nikhil Kothari, whose blog you should visit immediately if you're doing web development, demonstrates how to reproduce LINQ to Objects in JavaScript.

Nikhil is an architect on the Web Platform and Tools team at Microsoft known for his great projects, past and present, which include: ASP.NET Web Matrix, Web Development Helper, and Script#.

This time, Nikhil has a post in which he demonstrates how it's possible to write queries against JavaScript arrays, similarly to what LINQ to Objects offers for C# and VB.NET.

The following LINQ query in C#:

var someLocations =
  from location in allLocations
  where location.City.Length > 6
  select new { City = location.City, Country = location.Country };

can also be written as follows using query operators:

var someLocations =
 
allLocations
    .Where(
location => location.City.Length > 6)
    .Select(location => new { City = location.City, Country = location.Country });

The equivalent query could be written in JavaScript as follows: 

var someLocations =
  allLocations
    .filter(function(location) { return location.City.length > 6; })
    .map(function(location) { return { City: location.City, Country: location.Country }; });

Pretty close, isn't it? Learn more...


Cross-posted from http://linqinaction.net
Visual Studio 2006 is available

I've just downloaded Visual Studio 2006 err.. Visual Studio 2005's first service pack. Well, it's a 431MB download... Not bad for a patch.

Several issues have been fixed, of course, but new features also have been integrated such as the support for Web Application projects.

The service pack is available in multiple editions, depending on the version of Visual Studio 2005 you are using: 

Update: You should make sure you have some time available for the installation. Here, it took more than one hour and a half with 99% of the CPU occupied all the time!
 

Save money on .NET tools with SharpToolbox

Some .NET tool publishers have started running special offers on SharpToolbox. Look for the "special offer" sticker on the home page.

The first offer will allow you to save 10% on Dali, an object-relational mapper. More offers to come...

Lambda expressions in VB
Looks like VB is going to get support for lambda expressions after all. Paul Vick is discussing about the syntax.

Cross-posted from http://linqinaction.net
Posted: Dec 08 2006, 10:07 AM by Fabrice Marguerie | with no comments
Filed under: ,
LINQ videos from TechEd Developers 2006

Troy Magennis has the scoop: some of the talks given at TechEd Developers last month in Barcelona are now available on MSDN's ShowTime.

The LINQ sessions available right now are:

Nothing terribly new if you are already accustomed to LINQ, but good introductions otherwise. Anders' presentations are always interesting and clear. Looks like this guy knows what he's talking about. I wonder why ;-)

Note: the Powerpoint documents for the sessions are available for download.

Cross-posted from http://linqinaction.net
Charlie Calvert's LINQ posts

Charlie Calvert, who some of you may know for the years he spent at Borland or for his books on Delphi, joined Microsoft in July as the Community Program Manager for the Visual C# group.
Charlie has a blog full of C# and .NET community information. As part of his activities, he started a series of posts on LINQ:

  1. LINQ for Beginners
  2. Query Expressions
  3. Query Operators
  4. Using Distinct
  5. Focus on Grouping

Another great source of knowledge if you want to explore LINQ. 

Charlie also collected a list links about LINQ: Links to LINQ.


Cross-posted from http://linqinaction.net
Posted: Dec 05 2006, 05:07 PM by Fabrice Marguerie | with no comments
Filed under: ,
More Posts