title: Web API using Core and .Net framework 4.5.2. CAnnot set connection string
body: <p>I have an application that includes a Web API Core startup project.
  I found that I cannot scaffold an existing database in .Net Core for a View.
  So I decided for my Web API Core application that I will have to use the .Net framework and get the data in a project using EF6.
  However in the startup project (Web API Core) I need to set the connection string. For this I need EF6, and it would seem that I cannot do this even if I add EF6 in the project (maybe this can't be done in a Core project?).
  So this code fails where I attempt to add the context;</p>
  
  <pre><code>   public void ConfigureServices(IServiceCollection services)
      {
          services.AddMvcCore()
              .AddMvcOptions(o =&gt; o.OutputFormatters.Add(
                  new XmlDataContractSerializerOutputFormatter()));
          var connectionString = Startup.Configuration["connectionStrings:propertiesConnectionString"];
          services.AddDbContext&lt;SurveyEntities&gt;(o =&gt; o.UseSqlServer(connectionString));
  
          services.AddScoped&lt;IPropertiesRepo, PropertiesRepo&gt;();
  
      }
  </code></pre>
  
  <p>If I download EF6, I get this error; </p>
  
  <blockquote>
    <p>Error CS0311  The type 'Properties.EF6.MSurveyV2Entities' cannot be
    used as type parameter 'TContext' in the generic type or method
    'EntityFrameworkServiceCollectionExtensions.AddDbContext(IServiceCollection,
    Action, ServiceLifetime)'. There is no
    implicit reference conversion from 'Properties.EF6.MSurveyV2Entities'
    to 'Microsoft.EntityFrameworkCore.DbContext'.</p>
  </blockquote>
  
  <p>So how do I fix this?</p>