public string Run(int userId)
 {
     var newGuid = Guid.NewGuid().ToString();
     var persistentLogin = new PersistentLogin { UserId = userId, LoginGuid = newGuid };
     _persistentLoginRepository.Create(persistentLogin);
     return newGuid;
 }
 public void Delete(PersistentLogin persistentLogin)
 {
     _session.Delete(persistentLogin);
 }
 public void Create(PersistentLogin persistentLogin)
 {
     persistentLogin.LoginGuid = HashPassword.Run(persistentLogin.LoginGuid, "someSalt");
     persistentLogin.Created = DateTime.Now;
     _session.Save(persistentLogin);
 }