title: Expression type not supported: System.Linq.Expressions.TypedParameterExpression
body: <p>I am working on a project. I have the following Model</p>
  
  <pre><code>public class RegistrantClass : IRavenEntity
  {
     public RegistrantClass()
     {
         RegistrantId = new List&lt;string&gt;();
     }
     public int Id { get; set; }
  
     public IList&lt;String&gt; RegistrantId { get; set; }
  
     public String ClassId { get; set; }
  }
  </code></pre>
  
  <p>And I have the following index defined</p>
  
  <pre><code>        store.DatabaseCommands.PutIndex("RegistrantClass/ClassByStudents",
                              new IndexDefinitionBuilder&lt;RegistrantClass&gt;
                              {
                                  Map = students =&gt; from i in students
                                                    from j in i.RegistrantId
                                                    select new { j }
                              });
  </code></pre>
  
  <p>I try to query the above index like so</p>
  
  <pre><code>public object GetMapping(string registrantId)
  {
   var mapping = _session.Query&lt;RegistrantClass&gt;("RegistrantClass/ClassByStudents")
                               .Customize(i =&gt; i.Include&lt;RegistrantClass&gt;(k =&gt; k.RegistrantId))
                               .Customize(i =&gt; i.Include&lt;RegistrantClass&gt;(k =&gt; k.ClassId))
                               .FirstOrDefault(m =&gt; m.registrantId.Contains(registrantId));
  return mapping;
  }
  </code></pre>
  
  <p>But then i get the Error Message</p>
  
  <p>However that gives me NotSupportedException: Method not supported: Contains.</p>
  
  <p>I tried with the following code</p>
  
  <pre><code> .FirstOrDefault(m =&gt; registrantId.In&lt;string&gt;(m.RegistrantId));
  </code></pre>
  
  <p>But then I get the following Error Message</p>
  
  <pre><code>Expression type not supported: System.Linq.Expressions.TypedParameterExpression
  </code></pre>
  
  <p>What could Me Be Doing Wrong. Kind Regards</p>