title: Create EF Core as separate project in Visual Studio 2017
body: <p>I'm trying to create a separate EF Core 2 as separate project.</p>
  
  <p>I created a class library (.net core), add two references: <code>Microsoft.EntityFrameworkCore</code>, <code>Microsoft.EntityFrameworkCore.Design</code></p>
  
  <p>Then I met an error like:</p>
  
  <blockquote>
    <p>The specified framework 'Microsoft.NETCore.App', version '2.0' was not found</p>
  </blockquote>
  
  <p>I solved by adding in root folder a json file called <code>global.json</code> which content is:</p>
  
  <pre><code>{
     "sdk": {
        "version": "2.0.2"
     }
  }
  </code></pre>
  
  <p>Good until here.</p>
  
  <p>If I run command: <code>dotnet ef update database</code> it tells that:</p>
  
  <blockquote>
    <p>No database provider has been configured for this DbContext.</p>
  </blockquote>
  
  <p>Most of people said that I have to register in <code>Startup.cs</code>. But I don't have it because the project is class library, no mvc core application.</p>
  
  <p>So, what steps to do in this case ?</p>
  
  <p>Of course, I have a separate project for mvc core which has reference to that EF core project. Should I register the dbcontext in that <code>Startup.cs</code> file ?</p>