title: Return the SQL data in a specific format
body: <p>I have the following C# code that runs a SQL query:</p>
  <pre><code>var users = new List&lt;Person&gt;();
  try
  {
      conn.Open();                
      SqlCommand cmd = new SqlCommand(
          @$&quot;
          WITH emp AS (
                SELECT *
                FROM {tableName}
                WHERE Id = {id}
   
                UNION ALL
     
                SELECT e.*
                FROM {tableName} e INNER JOIN emp
                ON e.ManagerId = emp.Id
          )
          SELECT e.*
          FROM emp e;                    
          &quot;, conn);
      SqlDataReader reader = cmd.ExecuteReader();
  
      int id = reader.GetOrdinal(&quot;Id&quot;);
      int email = reader.GetOrdinal(&quot;Email&quot;);
      int managerId = reader.GetOrdinal(&quot;ManagerId&quot;);
      // 50 more                
      while (reader.Read())
      {
          var response = new Person
          {
              Id = reader.IsDBNull(id) ? null : reader.GetInt32(id).ToString(),
              Email = reader.IsDBNull(email) ? null : reader.GetString(email),
              ManagerId = reader.IsDBNull(managerId) ? 0 : reader.GetInt32(managerId)                        
              // 50 more 
          };
          users.Add(response);
      }
  
      reader.Close();
  }
  finally
  {
      conn.Close();
  }
  </code></pre>
  <p>Is there a different way to convert the response into Person data type as there &gt; 50 columns?</p>