title: Reuse of lambda expression
body: <p>Sorry for my english. I have LINQ to SQL query in .NET 3.5 and want to reuse DeviceExpression method in SearchDeviceExpression method. Something like that</p>
  
  <pre><code>public static Expression&lt;Func&lt;DEVICE_TYPE, bool&gt;&gt; SearchDeviceExpression2(string s)
  {
      return o =&gt; DEVICE_TYPE.DeviceExpression().Compile()(o) == s;
  }
  </code></pre>
  
  <p>In runtime I get exception <code>Method 'System.Object DynamicInvoke(System.Object[])' has no supported translation to SQL</code>. So it's true that no translation for that method, but maybe exists any workaround?</p>
  
  <p>My class.</p>
  
  <pre><code>[Table(Name = "DEVICE_TYPE_LOCAL")]
  public class DEVICE_TYPE
  {
      [Column]
      public string DEV_CODE
      {
          get;
          set;
      }
      [Column]
      public string DEVICE_NAME
      {
          get;
          set;
      }
      [Column]
      public string DEVICE_MARK
      {
          get;
          set;
      }
  
      public static Expression&lt;Func&lt;DEVICE_TYPE, string&gt;&gt; DeviceExpression()
      {
          return o =&gt; "(" + o.DEV_CODE + ") " + o.DEVICE_NAME + " " + o.DEVICE_MARK;
      }
  
      public static Expression&lt;Func&lt;DEVICE_TYPE, bool&gt;&gt; SearchDeviceExpression(string s)
      {
          return o =&gt; "(" + o.DEV_CODE + ") " + o.DEVICE_NAME + " " + o.DEVICE_MARK == s;
      }
  }
  </code></pre>