db4o Developer Community

db4o open source object database, native to Java and .NET
Welcome to db4o Developer Community Sign in | Join
in Search
More Search Options

Community News

"LINQ to db4o" community project update

Luciano has just released a new version of the "LINQ to db4o" adapter (v. 0.3). This version includes:

  • Initial unit tests
  • Major refactoring to allow for the support of the full range of LINQ
  • Support for GroupBy, Distinct, Average, Min, Max, Sum (operators can be in any order)

Luciano now splits the expression tree in the branches that can be optimized and the ones that cannot. A variation of the former version's code is used to generate the SODA queries and replace the remaining tree with an equivalent tree that uses the LINQ to Object operators or, if possible, a version optimized for the SODA enumerator.

The current version can now support more complex queries (even before having join and subqueries support) such as:

   var categories =
      from p in db.Products
      where p.CategoryID > 4
      group p by p.CategoryID into g
      orderby g.Key descending
      select new
      {
         g.Key,
         MostExpensiveProducts =
           from p2 in g
           where p2.UnitPrice == g.Max(p3 => p3.UnitPrice)
           select p2
      };

You can get the latest version here: http://projects.db4o.com/LINQ_To_Db4o

Published Thursday, January 03, 2008 10:03 AM by German Viscuso
Filed under: , ,


Comments

No Comments
Anonymous comments are disabled