title: Entity Framework Core 1.0 not scaffolding Controller and View
body: <p>I am following <a href="https://docs.microsoft.com/en-us/aspnet/core/data/ef-mvc/intro" rel="nofollow noreferrer">this tutorial</a>, using Visual Studio Community 2015 v 14.0.25431.01 Update 3  and MS .NET Framework v 4.6.91586, but get the following error when I attempt to scaffold the controller, as described:</p>
  
  <p><a href="https://i.stack.imgur.com/bRZoX.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bRZoX.jpg" alt="Error"></a></p>
  
  <p>I have tried all the suggested solutions <a href="https://stackoverflow.com/questions/14374242/no-parameterless-constructor-defined-for-this-object-in-asp-net-mvc-controller">here</a> and <a href="https://stackoverflow.com/questions/38869883/cannot-add-scaffold-mvc-controller-with-views-using-entity-framework-in-asp-n">here</a>, but to no avail. Yes, also tried (re)building the project.</p>
  
  <p>Here is the relevant code from my project.</p>
  
  <p>Student Model:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  
  namespace ContosoUniversity.Models
  {
      public class Student
      {
          public int ID { get; set; }
          public string LastName { get; set; }
          public string FirstMidName { get; set; }
          public DateTime EnrollmentDate { get; set; }
  
          public ICollection&lt;Enrollment&gt; Enrollments { get; set; }
      }
  }
  </code></pre>
  
  <p>SchoolContext:</p>
  
  <pre><code>public class SchoolContext : DbContext
      {
          public SchoolContext(DbContextOptions&lt;SchoolContext&gt; options) : base(options)
          {
          }
  
          public DbSet&lt;Course&gt; Courses { get; set; }
          public DbSet&lt;Enrollment&gt; Enrollments { get; set; }
          public DbSet&lt;Student&gt; Students { get; set; }
  
          protected override void OnModelCreating(ModelBuilder modelBuilder)
          {
              modelBuilder.Entity&lt;Course&gt;().ToTable("Course");
              modelBuilder.Entity&lt;Enrollment&gt;().ToTable("Enrollment");
              modelBuilder.Entity&lt;Student&gt;().ToTable("Student");
          }
  
      }
  </code></pre>
  
  <p>Added the SchoolContext to the services in startup.cs:</p>
  
  <pre><code>public void ConfigureServices(IServiceCollection services)
          {
              // Add framework services.
              services.AddApplicationInsightsTelemetry(Configuration);
  
              services.AddDbContext&lt;SchoolContext&gt;(options =&gt;
                  options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")));
  </code></pre>
  
  <p>And this is my connectionstring in appSetting.json:</p>
  
  <pre><code>"ConnectionStrings": {
      "DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=aspnet-ContosoUniversity-75b88406-9d10-4237-814a-3f725b9b4e3d;Trusted_Connection=True;MultipleActiveResultSets=true"
    }
  </code></pre>