title: ASP.NET Core Web API - implement multiple databases using Sybase and SQL Server
body: <p>For some days now I've been trying to implement multiple databases in ASP.NET Core-6 Web API using Sybase and SQL Server. I have never done this before.</p>
  <p>I have this connection:</p>
  <pre><code>  &quot;ConnectionStrings&quot;: {
      &quot;MssqlDbConnection&quot;: &quot;Server=nikatic;Database=mymssql;Trusted_Connection=True; MultipleActiveResultSets=true;&quot;,
      &quot;SybaseDbConnection&quot;: &quot;Server=nxppawe;Database=mysybase;Port=6645;Min Pool Size=100;Max Pool Size=1000;User ID=acme;Password=lennon;charset=cp850;&quot;
    },
  </code></pre>
  <p>I have three (3) tables:</p>
  <ol>
  <li>Employees  ---&gt; From SQL Server</li>
  <li>EmployeeProject  --&gt; Sybase</li>
  <li>Projects  --&gt; Sybase</li>
  </ol>
  <p>I want to query the 3 tables from the two different databases and display the result.</p>
  <pre><code>using System.Data;
  using System.Data.SqlClient;
  
  var sql = @&quot;select e.EmployeeId, e.Name, e.StaffNo, e.Gender, e.DateOfBirth, p.ProjectId, p.Name, p.Duration
              from Employees e
              inner join
              EmployeeProject ep on ep.EmployeeId = e.EmployeeId
              inner join 
              Projects p on p.ProjectId = ep.ProjectId;&quot;;
  </code></pre>
  <p>How do I achieve this?</p>
  <p>Thank you</p>