Hi Darren,
 
Since you've asked me specifically: can you please post the whole query? I 
specifically need to know what "hh2" is.
 
I've just run the following query within re-linq's test suite:

var hh2 = new C1();
var query = QuerySource
  .Where (p => p.ID == hh2.InternalUser.CurrentUser.Options.GetOptionValue 
(206).ToInt());
 
var parsed = QueryParser.GetParsedQuery (query.Expression);
 
Console.WriteLine (parsed);

(For the declarations I used, see below.)
 
In this test, re-linq correctly evaluates the expression to the right of the 
== sign in-memory.
 
re-linq can and should partially evaluate the expression if all data is 
available in memory. What you describe should only happen if hh2 is a 
parameter, e.g., if the Where clause is part of a subquery nested within an 
outer query.
If hh2 is actually an in-memory object, this might be a bug in re-linq. In 
that case, please follow up with us at 
http://groups.google.com/group/re-motion-users.
 
Regards,
Fabian

class C1
{
  public User InternalUser = new User ();
}
 
class User
{
  public CurrentUser CurrentUser = new CurrentUser ();
}
 
class CurrentUser
{
  public Options Options = new Options ();
}
 
class Options
{
  public Option GetOptionValue (int i)
  {
    return new Option ();
  }
}
 
class Option
{
}
 
static class OptionExt
{
  public static int ToInt (this Option o)
  {
    return 4711;
  }
}

Reply via email to