public async Task <IdentityResult> RegisterUserAsync(string userName, string email, string password) { var response = new IdentityResult(); AppUser user = new AppUser { UserName = userName, Email = email }; response = await this._userManager.CreateAsync(user, password); ApplicationRoleManager.AddUserToRole(this._userManager, user.Id, "User"); return(response); }