title: ASP.NET MVC Core/6: EF 6 scaffolding error
body: <p>I am using <code>EF 6</code> with <code>MVC</code> Core/6. My models and db context are in separate project and I use DI to inject the db context into the controllers. But when I try to scaffold the controller using <code>EF 6</code> as the data context class I am getting the following error:</p>
  
  <p><strong>Error</strong> </p>
  
  <blockquote>
    <p>There was an error running the selected code generator: 
        'A type with the name MyProject.DAL.ModeIs.MyModel does not exist 
        Microsoft.VisuaIStudio.Web.CodeGeneration.ActionInvokerb__6_0() 
        Microsoft. Extensions.CommandLineUtiIs.CommandLineAppIication.Exe 
        cute(String[] args) 
        Microsoft.VisualStudio.Web.CodeGeneration.CodeGenCommand.Execu 
        te(String[] args)'</p>
  </blockquote>