Monday, June 18, 2007 4:45 PM bart

LINQ to SharePoint - Announcing the 0.2 alpha release

Hi folks,

It's a lovely day, especially for the LINQ to SharePoint project (www.codeplex.com/LINQtoSharePoint). The last set of features that were planned for the 0.2 release have been implemented finally and code has been checked in to the CodePlex source control. So, I'm extremely proud to announce the 0.2 alpha release is coming closer day after day. This version targets the Orcas Beta 1 release and WSS 3.0 (although it should work fine with older versions of SharePoint too, but notice these versions didn't get the desired amount of testing yet).

image

Key improvements have been made on the level of the query parser and the SpMetal tool. Here's a quick overview of the core features covered in 0.2:

  • Enhanced support for SharePoint list field types, including Lookup and LookupMulti fields with lazy loading support and subquery support, e.g.

    from user in users where user.IsMember select new { user.Name, user.Profile }; // user.Profile will be loaded lazily when a property is accessed
    from user in users where user.Profile.Age >= 24 select user; // a subquery will be created for the user.Profile.Age >= 24 part

    image

  • Changes to the entity model used by LINQ to SharePoint, in preparation for update support down the road, e.g.

    class User
    {
       [Field("First Name", FieldType.Text]
       public string FirstName
       {
          get return (string)GetValue("FirstName"); } // GetValue is defined on the SharePointListEntity base class
          set SetValue("FirstName", value); } // SetValue is defined on the SharePointListEntity base class
       }
    }

    image
  • Optimization of the CAML queries generated by the query parser, e.g.

    from e in src where 1 == 1 && e.Age >= 24 select e; // (true && e.Age >= 24) == (e.Age >= 24) - similar optimizations are in place for other boolean operators
  • Support for First and FirstOrDefault query operators, e.g.

    (from e in src select e).First(); // equals to .Take(1)
  • Introduction of a CamlMethods static class with helper functions, including DateRangeOverlaps, e.g.

    from task in tasks where CamlMethods.DateRangeOverlaps(DateTime.Now, task.DueDate) select task; // generates a <DateRangeOverlaps> CAML element

    image

    image

  • Support for Now and Today elements, e.g.

    from task in tasks where task.DueDate >= DateTime.Today select task; // generates a <Today> CAML element; similar treatment for DateTime.Now
  • Multiple Where clauses per query are supported, e.g.

    from user in users where user.IsMember orderby user.Age descending where user.Age >= 24 select user; // constructs an <And> combination of individual where predicates
  • SpMetal improvements and separation of front-end and back-end functionality, allowing for hosting of SpMetal functionality in other environments (such as an IDE);
  • Availability of the first draft of the technical spec;
  • First set of unit tests covering the query parser;
  • Lots of bug fixes.

I'm also happy to tell that planning for the 0.3 release has started today. 0.3 will likely be the first beta release of the project, covering overall improvements to the query parser and the addition of entity update support through SharePointDataSource<T>. More exciting features are on the wish-list and hopefully these will make their way to the first beta. Stay tuned and leave your feedback!

In the meantime, make sure to check out the project's home page at www.codeplex.com/LINQtoSharePoint. The 0.2 release bits will become available later this month but for those of you who can't wait, the most up-to-date sources are available at any time via the Source Code tab :-). The next couple of days, additional testing will be carried out to ensure stability of the 0.2 release.

Btw, other 3rd party LINQ Providers are under development too - check out the OakLeaf Systems blog at http://oakleafblog.blogspot.com/2007/03/third-party-linq-providers.html for a list of such implementations.

Del.icio.us | Digg It | Technorati | Blinklist | Furl | reddit | DotNetKicks

Filed under: ,

Comments

# &raquo; LINQ to SharePoint - Announcing the 0.2 alpha release

Pingback from  &raquo; LINQ to SharePoint - Announcing the 0.2 alpha release

# re: LINQ to SharePoint - Announcing the 0.2 alpha release

Tuesday, June 19, 2007 1:52 PM by Frank Quednau

This sounds really nice! Congrats for a nice job. I just need a Sharepoint project now and I'd splash all over this.

# LINQ to SharePoint alpha v0.2 available

Friday, June 29, 2007 6:49 PM by B# .NET Blog

Two months after the appearance of the 0.1.2 alpha release of LINQ to SharePoint , I&#39;m proud to announce

# LINQ to SharePoint alpha v0.2 available

Friday, July 06, 2007 4:24 AM by LINQ to SharePoint

Two months after the appearance of the 0.1.2 alpha release of LINQ to SharePoint , I&#39;m proud to announce