title: Extension method that works on IEnumerable<T> and IQueryable<T>?
body: <p>I want an extension method that works on both my List and IQueryable.  The extension methods below accomplish this, but then if I add another identical extension method, but on a different totally unrelated type I get ambiguous call
  compile errors.  Why is that?  Isn't the compiler smart enough to know which extension method works?  I mean, only one of these calls is valid, why can't the compiler tell?  Thanks a lot!</p>
  
  <pre><code>class ClassA
  {
    public bool IsActive{ get; set;}
  }
  
  class ClassB
  {
    public bool IsActive { get; set;}
  }
  
  
  // then here are my extensions
  
  public static T IsActive&lt;T&gt;(this T enumerableOrQueryable, bool isActive)
    where T : IEnumerable&lt;ClassA&gt;
  {
    return (T)enumerableOrQueryable.Where(x =&gt; x.IsActive == isActive);
  }
  
  public static T IsActive&lt;T&gt;(this T enumerableOrQueryable, bool isActive)
    where T : IEnumerable&lt;ClassB&gt;
  {
    return (T)enumerableOrQueryable.Where(x =&gt; x.IsActive == isActive);
  }
  </code></pre>