public Task <Guid?> GetCashier(string username, string password, string cashierName) { return(Task.Run <Guid?>(() => { var user = _userRepository.GetUser(username, ComputeSha256Hash(password)); if (user is null) { return null; } var result = _cashierRepository.GetCashierKey(cashierName); return result == Guid.Empty ? null : result; })); }