title: Entity Framework join across two databases
body: <p>I have a WebAPI.  I need to return a list of <code>ActivityRegisters</code>.  We have a repository that does it like this: </p>
  
  <pre><code>public IQueryable&lt;ActivityRegister&gt; GetRegisters(int activityID) 
  {
      return ActivityDBContext.ActivityRegisters.Where(x =&gt; x.ActivityID == activityID x.IsActive == true).OrderBy(x =&gt; x.ActivityRegisterID).AsQueryable();
  }
  </code></pre>
  
  <p>However, there is a nullable column on the <code>ActivityRegister</code> table called <code>roomID</code>.  There is a Rooms table but it is in a different database which we have a <code>AdminDBContext</code> for.  I need the API to return the <code>roomName</code> in the payload which exists in the Admin DB.  How can I get the above method to return the the <code>roomName</code> using the <code>roomID</code>?  Thank you, I'm new and learning.</p>