public void SetPassword()
        {
            var userRepository = new UserRepository();
            var userEntity = userRepository.GetBy(Id);

            var password = new Password(ConfirmedPassword);
            userEntity.HashedPassword = password.GetHashed();
            userEntity.Salt = password.GetSalt();

            userRepository.SaveChanges();
        }
        public void Confirm(string userId)
        {
            var userRepository = new UserRepository();

            var userEntity = userRepository.GetBy(GetGuidBy(userId));

            if (userEntity.IsConfirmed)
            {
                return;
            }

            userEntity.IsConfirmed = true;
            userRepository.SaveChanges();
        }