Problem with Linq Query Statement

Sep 22, 2008 at 1:35 PM
I am having a problem with LinqToSharePoint v0.2.4. The code I wrote is as follows:

var context - new TasksSharePointDataContext();
var res = from t in context.LinqTasks
              select t.Title;

This works fine, where t.Title is the Title field in the SharePoint list called LinqTasks. However, if I write this:

var context - new TasksSharePointDataContext();
var res = from t in context.LinqTasks
              select t.Title, t.Status;

This should work because Status is a field in LinqTasks. However, when I type the second t. intellisense is not available and the error I get on t.Status is Invalid Expression Term ','. If I write select new (), as follows:

var context - new TasksSharePointDataContext();
var res = from t in context.LinqTasks
              select new ( Task = t.Title, t.Status );

intellisense works for t.Status(and any other fields in LinqTasks), however, I get an error on the first parentheses '(' stating: Type Expected.

Is this a bug in v0.2.4 or my code or configuration?