public RegistrationResult RegisterUser(RegistrationDetails registrationDetails)
        {
            var exists = _registrationRepository.DoesEmailAlreadyExist(registrationDetails.Email);

            if (exists)
            {
                return(new RegistrationResult {
                    Success = false, Message = "The Email is already registered"
                });
            }

            var hashed = _passwordHasher.CreateHash(registrationDetails.Password);

            registrationDetails.Password = hashed;

            var result = _registrationRepository.CreateUser(registrationDetails);

            return(result > 0
                ? new RegistrationResult {
                Success = true, Message = "Registration was successful"
            }
                : new RegistrationResult {
                Success = false, Message = "Registration was unsuccessful, please try again later"
            });
        }