title: no parameterless constructor defined for type dbcontext
body: <p>I search many posts in stack and another sites about this error but it wasn't my answer
  this is my DbCintext</p>
  <pre><code>[Table(&quot;AspNetUsers&quot;)]
  public class ApplicationUser : IdentityUser { }
  
  public class EMSContext : IdentityDbContext&lt;ApplicationUser&gt; {
     
  
      public EMSContext (DbContextOptions&lt;EMSContext&gt; options) : base (options) { }
  
      public DbSet&lt;Ambulance&gt; Ambulances { get; set; }
   }
  </code></pre>
  <p>and this is mu StartUp.cs</p>
  <pre><code> services.AddControllers();
          
          services.AddDbContext&lt;EMSContext&gt;(options =&gt;
            options.UseSqlServer(Configuration.GetConnectionString(&quot;DefaultConnection&quot;)));
  </code></pre>
  <p>but when I want to generate api controller I got this error</p>
  <blockquote>
  <p>no parameterless constructor defined for type dbcontext</p>
  </blockquote>