title: Entity Framework Core Error: No parameterless constructor defined for this object
body: <p>At the point of creating a new MVC Controller:</p>
  
  <p><a href="https://i.stack.imgur.com/dGJSN.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dGJSN.jpg" alt="enter image description here"></a></p>
  
  <p>after I click Add button, I get the following Error:</p>
  
  <p><a href="https://i.stack.imgur.com/vq29s.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vq29s.jpg" alt="enter image description here"></a></p>
  
  <p>Here is my simple Context class:</p>
  
  <pre><code>  public class MainDbContext : DbContext
    {
      public MainDbContext(DbContextOptions&lt;MainDbContext&gt; options) : base(options)
      {
      }
  
      public DbSet&lt;Todo&gt; Todo { get; set; }
  
    }
  </code></pre>
  
  <p>and my simple model:</p>
  
  <pre><code>public partial class Todo
  {
      public int Id { get; set; }
      public string TaskName { get; set; }
  }
  </code></pre>
  
  <p>I have made some search on this issue, most of the posts point to a dropdown list or a SelectList method using MVC, but for my case it is a Controller creation fail, so it seems to be an <strong>Entity Framework Core issue</strong></p>
  
  <p>Any help ?</p>