title: How to add migration in the multi-project solution?
body: <p>I'm using <code>VSCode</code> and I'm struggling to add my first migration in the "multi-project solution". Usually I was doing one <code>.csproj</code> per project, but recently I decided to play with the <code>.sln</code> file and I hit the wall while doing migrations. This is my project structure:</p>
  
  <pre><code>MyApi
    - src
       - MyApi.Domain
       - MyApi.Infrastructure (this is where my DbContext is)
       - MyApi.WebApi (this is where my connection sting is)
    - tests
    - MyApi.sln
  </code></pre>
  
  <p>I'm trying to create the database in <code>PostgreSQL</code> database, so this are the packages I installed in my <code>MyApi.Infrastructure</code> project.</p>
  
  <pre><code>  &lt;ItemGroup&gt;
      &lt;PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.2"&gt;
        &lt;IncludeAssets&gt;runtime; build; native; contentfiles; analyzers; buildtransitive&lt;/IncludeAssets&gt;
        &lt;PrivateAssets&gt;all&lt;/PrivateAssets&gt;
      &lt;/PackageReference&gt;
      &lt;PackageReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="2.0.3" /&gt;
      &lt;PackageReference Include="Microsoft.NETCore.App" Version="2.2.8" /&gt;
      &lt;PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="3.1.2" /&gt;
      &lt;PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.Design" Version="1.1.1" /&gt;
    &lt;/ItemGroup&gt;
  </code></pre>
  
  <p>I'm trying to run migration while in the Infrastructure project, but I'm getting this error:</p>
  
  <blockquote>
    <p>Unable to create an object of type 'MyDbContext'. For the different
    patterns supported at design time, see
    <a href="https://go.microsoft.com/fwlink/?linkid=851728" rel="nofollow noreferrer">https://go.microsoft.com/fwlink/?linkid=851728</a></p>
  </blockquote>
  
  <p>It's not a surprise, because it doesn't even know the connection string. </p>
  
  <p><strong>How should I handle migrations in such project structure?</strong></p>