示例#1
0
        private void NewPasswordButton_Click(object sender, RoutedEventArgs e)
        {
            var passwordDto    = new Core.Dtos.PasswordDto();
            var passwordWindow = new EditPasswordWindow(passwordDto);

            if (passwordWindow.ShowDialog() == true)
            {
                _passwordRepository.Add(new Password(_profile.Id, passwordDto, _password));
                RefreshPasswords();
            }
        }
        private async Task AddPassword(User user)
        {
            var userPassword = new UserPassword(user.Id, _passwordManager.CreatePasswordHash(user.Password));

            await _passwordRepository.Add(userPassword);
        }