title: Unable to resolve service for type 'Schutters.Models.SchuttersContext' while attempting to activate 'Schutters.Controllers.ClubController'
body: <p>I just scaffolded my database classes into controllers and added the options to my view but when I try to click them on my navigation bar the action&quot;Index&quot; should be shown but I am receiving this error instead:</p>
  <blockquote>
  <p>Unable to resolve service for type 'Schutters.Models.SchuttersContext'
  while attempting to activate 'Schutters.Controllers.ClubController'</p>
  </blockquote>
  <p>My startup class:</p>
  <pre><code>public class Startup
      {
          public Startup(IConfiguration configuration)
          {
              Configuration = configuration;
          }
      public IConfiguration Configuration { get; }
  
      // This method gets called by the runtime. Use this method to add services to the container.
      public void ConfigureServices(IServiceCollection services)
      {
          services.AddDbContext&lt;ApplicationDbContext&gt;(options =&gt;
              options.UseSqlServer(
                  Configuration.GetConnectionString(&quot;SchuttersConnection&quot;)));
          services.AddDefaultIdentity&lt;IdentityUser&gt;(options =&gt; options.SignIn.RequireConfirmedAccount = true)
              .AddEntityFrameworkStores&lt;ApplicationDbContext&gt;();
          services.AddControllersWithViews();
          services.AddRazorPages();
          
      }
  </code></pre>
  <p>}</p>
  <p>The controller that gets called when I click &quot;Clubs&quot; on the navigation bar</p>
  <pre><code>public class ClubController : Controller
  {
      private readonly SchuttersContext _context;
  
      public ClubController(SchuttersContext context)
      {
          _context = context;
      }
  
      // GET: Club
      public async Task&lt;IActionResult&gt; Index()
      {...}
  }
  </code></pre>
  <p><img src="https://i.stack.imgur.com/9XWMn.png" alt="enter image description here" /></p>