title: Seed roles in an ASP.NET MVC Core project with Entity Framework
body: <p>I am trying to seed some roles to my identity db context, when I initially create the database.</p>
  
  <p>For that I tried to implement the code like it was stated here:
  <a href="https://stackoverflow.com/a/29547994/985798">https://stackoverflow.com/a/29547994/985798</a></p>
  
  <p>I tried this in the ConfigureServices-method inside my Startup-class:
    public void ConfigureServices(IServiceCollection services)</p>
  
  <p>using this snippet:</p>
  
  <pre><code>var rolestore =
      new Microsoft.AspNetCore.Identity.EntityFrameworkCore.
          RoleStore&lt;Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole&gt;(identityContext);
  
  var roleManager = new Microsoft.AspNetCore.Identity.RoleManager
                    &lt;Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole&gt;(rolestore);
  
  //use rolemanager to insert roles etc.
  </code></pre>
  
  <p>The problem is, that it seems to not work in an fresh Core-project, created with Visual Studio 2017.</p>
  
  <p>It gives me the following build error:</p>
  
  <blockquote>
    <p>CS7036    There is no argument given that corresponds to the required
    formal parameter 'roleValidators' of
    'RoleManager.RoleManager(IRoleStore,
    IEnumerable>, ILookupNormalizer,
    IdentityErrorDescriber, ILogger>,
    IHttpContextAccessor)'</p>
  </blockquote>
  
  <p>Even if I use the other overload (with null values for the other parameters), the RoleManager seems to have no "Create" method anymore.</p>
  
  <p>So, I am stuck at this point. What do I need to do? Has something changed in the ASP.NET MVC Core implementation of the rolemanager? Do I use something wrong?</p>