title: Seed Entities AND Users, Roles?
body: <p>How do you seed users, roles and app specific entities?  It appears as though the IdentityModel targets its own Context?</p>
  
  <pre><code>internal sealed class Configuration : DbMigrationsConfiguration&lt;Project.Models.SchoolContext&gt;
  {
      public Configuration()
      {
          AutomaticMigrationsEnabled = false;
      }
  
      protected override void Seed(Project.Models.SchoolContext context)
      {
          // Seed the Entities
          //    context.People.AddOrUpdate(
          //      p =&gt; p.FullName,
          //      new Person { FullName = "Andrew Peters" }            
          //    );
          //
      }
  }
  </code></pre>
  
  <p>vs.</p>
  
  <pre><code>protected override void Seed(Project.Models.ApplicationDbContext context)
  {
      if (!context.Roles.Any(r =&gt; r.Name == "AppAdmin"))
      {
          var store = new RoleStore&lt;IdentityRole&gt;(context);
          var manager = new RoleManager&lt;IdentityRole&gt;(store);
          var role = new IdentityRole { Name = "AppAdmin" };
          manager.Create(role);
      }
  
      if (!context.Users.Any(u =&gt; u.UserName == "founder"))
      {
          var store = new UserStore&lt;ApplicationUser&gt;(context);
          var manager = new UserManager&lt;ApplicationUser&gt;(store);
          var user = new ApplicationUser {UserName = "founder"};
  
          manager.Create(user, "ChangeItAsap!");
          manager.AddToRole(user.Id, "AppAdmin");
      }
  }
  </code></pre>