public void UpdatePasswordHistoryDto(PasswordHistoryDto passwordHistory) { if (_passwordHistories.ContainsKey(passwordHistory.UserName)) { _passwordHistories[passwordHistory.UserName] = passwordHistory; return; } throw new Exception("Db exception, Detailed Message: PasswordHistory not found"); }
public void AddPasswordHistoryDto(PasswordHistoryDto passwordHistory) { if (!_passwordHistories.ContainsKey(passwordHistory.UserName)) { _passwordHistories.Add(passwordHistory.UserName, passwordHistory); return; } throw new Exception("Db exception, Detailed Message: Key already exist"); }