title: The binary operator Or is not defined for the types 'DAL.Tag' and 'System.Boolean'
body: <p>I created a Generic Repository class like below :<br></p>
  
  <pre><code>public abstract class Repository&lt;TEntity, TIdentifier&gt; : IRepository&lt;TEntity, TIdentifier&gt; where TEntity : class
  {
      //TEntity is type of DBSet and TIdentifier is name of SQL Table's Id column
      protected Repository(DbContext context)
      {
          Context = context;
          DBSet = Context.Set&lt;TEntity&gt;();
      }
  }
  </code></pre>
  
  <p>in this Class we have a method named <code>SelectAll</code> as the following :</p>
  
  <pre><code>[DataObjectMethod(DataObjectMethodType.Select, true)]
  public IEnumerable&lt;TEntity&gt; SelectAll(IEnumerable&lt;TIdentifier&gt; ids, List&lt;string&gt; includeNavigationProperties = null)
  {
      ParameterExpression parameter = Expression.Parameter(typeof(TEntity), "entity");
      MemberExpression leftParam = Expression.MakeMemberAccess(parameter, typeof(TEntity).GetProperty(IdentifierColumn));
      Expression body = parameter;
      foreach (TIdentifier identifier in ids)
      {
          var rightParam = Expression.Constant(identifier);
          body = Expression.Or(body, Expression.Equal(leftParam, rightParam));//Exception
      }
      return (IEnumerable&lt;TEntity&gt;) DBSet.Select(Expression.Lambda&lt;Func&lt;TEntity, bool&gt;&gt;(body, parameter));
  }
  </code></pre>
  
  <p>As you can see I wanted to select all rows with Id column in <code>IEnumerable&lt;TIdentifier&gt; ids</code>. But the following exception has occurred:</p>
  
  <blockquote>
    <p>The binary operator Or is not defined for the types 'DAL.Tag' and 'System.Boolean'</p>
  </blockquote>