public WorkerAccount AddWorkerAccount(WorkerAccount workerAccount) { string roleName = "Worker"; SystemRole role = _systemRolesRepository.GetSystemRoleByName(roleName); workerAccount.Role = role; workerAccount.AccountType = "Worker"; workerAccount.Password = BCrypt.Net.BCrypt.HashPassword(workerAccount.Password); WorkerAccount w = _accountsRepository.AddWorkerAccount(workerAccount); return(w); }