Beispiel #1
0
 /**
  * This method seeds admin and guest users
  * **/
 public void SeedUsers(UserManager <ApplicationUser> userManager, UserInitVariables initVariables)
 {
     SeedUser(userManager, initVariables.AdminUserName, initVariables.AdminEmail,
              initVariables.AdminPassword, SecurityConstants.AdminRoleString);
     SeedUser(userManager, initVariables.GuestUserName, initVariables.GuestEmail,
              initVariables.GuestPassword, SecurityConstants.GuestRoleString);
 }
Beispiel #2
0
        /**
         * This method seeds admin, guest role and admin user
         * **/
        public void SeedData()
        {
            // get admin params from configuration
            UserInitVariables initVariables = new UserInitVariables();

            initVariables.InitializeFromConfig(Configuration);
            // seed roles
            SeedUserRoles(RoleManager);
            // seed admin user
            SeedUsers(UserManager, initVariables);
        }