title: Using ServiceStack.Redis, how can I run strongly-typed read-only queries in a transaction
body: <p>I'm aware that I can increase performance of Redis queries by executing them in a transaction (and even more so in a dedicated pipeline).</p>
  
  <p>The problem is that using the ServiceStack Redis client, I can execute the reads in a transaction but I cannot access the results. This is the code I have below:</p>
  
  <pre><code>User user = null;
  Group group = null;
  
  using (IRedisClient cacheClient = new RedisClient())
  using (var trans = cacheClient.CreateTransaction())
  {
      trans.QueueCommand(x =&gt;
      {
          var userClient = x.As&lt;User&gt;();
          var userHash = userClient.GetHash&lt;string&gt;("Users");
          user = userClient.GetValueFromHash(userHash, userKey);
      });
  
      trans.QueueCommand(y =&gt;
      {
          // Retrieve modules from cache
          var groupClient = y.As&lt;Group&gt;();
          var groupHash = groupClient.GetHash&lt;string&gt;("Groups");
          group = groupClient.GetValueFromHash(groupHash, groupKey);
      });
  
      trans.Commit()
  }
  </code></pre>
  
  <p>The problem here is that the <code>user</code> and <code>group</code> variables are not set with the output from the transaction.</p>
  
  <p>So, how can I run a series of different strongly-typed <em>read</em> queries in a transaction (or pipeline) and retrieve the results?</p>
  
  <p>Thanks.</p>