title: Entity Framework (Core) Query Multiple Tables From 2 Different Databases
body: <p>How can I write a query to get data from 2 (or more) tables from different databases with EF Core? I have now the following code:</p>
  
  <pre><code>var items = (
      from o in _db1.Orders
      join c in _db2.Customers on o.CustomerId equals c.CustomerId
      where c.CustomerId = 1
      select c;
  ).ToList();
  </code></pre>
  
  <p>In MySql I have this query that needs to be transformed to the expression above (<code>Linq</code>).</p>
  
  <pre><code>SELECT c.* 
  FROM db1.Customers c
     JOIN db2.Orders o ON c.CustomerId = o.CustomerId 
  WHERE c.CustomerId = 1;
  </code></pre>
  
  <p>Please help</p>