public static AppUser CreateUser(string userName) { try { AppUser appUser = new AppUser(); appUser.Email = userName + "@nowhere.com"; appUser.UserName = userName; appUser = SecUserManager.CreateUser(appUser, userName); WriteLine($"{appUser.UserName} was created."); return(appUser); } catch (Exception ex) { WriteLine(ex.Message); return(null); } }