public static NetPlanetesUserManager Create(IdentityFactoryOptions <NetPlanetesUserManager> options, IOwinContext context)
        {
            NetPlanetesIdentityDbContext db      = context.Get <NetPlanetesIdentityDbContext>();
            NetPlanetesUserManager       manager = new NetPlanetesUserManager(new UserStore <NetPlanetesUser>(db));

            manager.UserValidator = new UserValidator <NetPlanetesUser>(manager)
            {
                AllowOnlyAlphanumericUserNames = true,
                RequireUniqueEmail             = true
            };
            return(manager);
        }
        public void BuildInitialData(NetPlanetesIdentityDbContext context)
        {
            NetPlanetesUserManager manager = new NetPlanetesUserManager(new UserStore <NetPlanetesUser>(context));

            string          username = ConfigurationManager.AppSettings["np:MasterName"] ?? "cmsadmin";
            string          email    = ConfigurationManager.AppSettings["np:MasterEmail"] ?? "*****@*****.**";
            string          password = ConfigurationManager.AppSettings["np:MasterPassword"] ?? "cmsadminPassword!";
            NetPlanetesUser user     = new NetPlanetesUser
            {
                UserName = username,
                Email    = email,
            };
            var result = manager.CreateAsync(user, password);

            result.Wait();
            return;
        }