title: LinqToLdap query multiple namingContexts
body: <p>I'm using LinqToLdap.  I've been successful to search users from within one namingContext (ie, this is a particular OU within the AD).  What I want to do is add another namingContext and be able to query both of them at once.</p>
  
  <p>Do you know how I can achieve this?</p>
  
  <p>I've done the following but with no success - it always searches against the first Mapping.</p>
  
  <pre><code>var config = new LdapConfiguration();
  
  
  config.AddMapping(new UserMap1(), "namingContext1 - OU etc etc");
  config.AddMapping(new UserMap2(), "namingContext2 - OU etc etc");
  
  public class UserMap1: ClassMap&lt;User&gt;
  public class UserMap2: ClassMap&lt;User&gt;
  </code></pre>
  
  <p>My query is as follows - </p>
  
  <pre><code>using (var context = new LinqToLdap.DirectoryContext(conn, true, config))
              {
  
                  var query =
                      context.Query&lt;User&gt;()
                          .Where(x =&gt; searchTextAsArray.Contains(x.GivenName) || searchTextAsArray.Contains(x.Sn))
                          .Select(u =&gt; new
                          {
                              u.GivenName,
                              u.Sn,
                              u.DistinguishedName,
                              u.Cn,
                              u.UserPrincipalName,
                              Score = (searchTextAsArray.Contains(u.GivenName) ? 1 : 0) + (searchTextAsArray.Contains(u.Sn) ? 1 : 0)
                          }).ToList();
  
  
                  var results = query.OrderByDescending(u =&gt; u.Score).ThenBy(u =&gt; u.Sn).ThenBy(u =&gt; u.GivenName);
  
  
                  foreach (var result in results)
                  {
                      Console.WriteLine("{0} {1} - {2}",
                          result.GivenName,
                          result.Sn,
                          result.Score);
                  }
  
              }
  </code></pre>
  
  <p>It only takes into account the first mapping... </p>
  
  <p>Any help would be great.</p>