Linq query broken after saving BusinessListBase - Csla 3.5 beta2

Linq query broken after saving BusinessListBase - Csla 3.5 beta2

Old forum URL: forums.lhotka.net/forums/t/4494.aspx


Christian posted on Thursday, March 13, 2008

After saving a BusinessListBase using
list = list.Save();
a Linq query against that list results in a System.ArgumentNullException in the System.Linq namespace.

The problem seems to be that the _expression field is null at that point. A change in BusinessListBase.cs solves the problem.

Original property:
public Expression Expression
{
  get { return _expression; }
}

Modified property:
public Expression Expression
{
  get
  {
      if (_expression == null)
      {
          _expression = Expression.Constant(this);
      }
      return _expression;
  }
}
-Christian

RockfordLhotka replied on Thursday, March 13, 2008

Thanks, I'll make sure Aaron sees this.

Copyright (c) Marimer LLC