title: Maintaining an instance of an object in a hub class for signalR
body: <p>I currently have the following code for my hub class:</p>
  
  <pre><code>public class MatchMaker : Hub
      {    
  
  
      private List&lt;SoloUser&gt; soloUsers = new List&lt;SoloUser&gt;();
  
      //Client Requests
      public void findNewPartner(string Country, string State)
      {
          SoloUser soloUser = soloUsers.FirstOrDefault(s =&gt; (s.Country== Country) &amp;&amp; (s.State == State));
          if (soloUsers.Count &gt; 0)
              Clients.partnerRequestResult(soloUsers.FirstOrDefault());
          else
          {
              soloUser = new SoloUser { 
                  Major = Major,
                  School = School,
                  SessionId = SessionId,
                  Token = token
              };
              soloUsers.Add(soloUser);
          }
  
  
  
      }
  }
  </code></pre>
  
  <p>The problem is whenever I call this method on the client side, adding a SoloUser object to my <code>soloUsers</code> collection does not save, so when another user calls this function again, the linq statement(<code>soloUsers.FirstOrDefault(s =&gt; (s.School == School) &amp;&amp; (s.Major == Major))</code>) never finds a SoloUser.  How can I make it so my <code>soloUsers</code> collection will save the instance and the objects added to it?</p>