title: Custom properties and lambda expressions
body: <p>I've added a custom property to a LINQ-to-SQL entity:</p>
  
  <pre><code>public partial class User
  {
      public bool IsActive
      {
          get
          {
              // note that startDate and endDate are columns of User table
              return startDate &lt;= DateTime.Now &amp;&amp; endDate &gt;= DateTime.Now;
          }
      }
  }
  </code></pre>
  
  <p>and now I need to use this property with lambda expressions:</p>
  
  <pre><code>activeUsers = users.Where(u =&gt; u.IsActive);
  </code></pre>
  
  <p>but when this code is executed I get a <code>System.NotSupportedException</code>. The exception message says that <em>"SQL conversions for the member 'User.IsActive' are not supported"</em>.</p>
  
  <p>Is there a way to solve this problem?</p>