title: Get specific column from a dapper result set
body: <p>I'm new using Dapper and I want a better way to fetch data from a certain column in a Dapper row. Data is being retrieved from a stored procedure that returns 1 or more rows with 5 columns but I only need to get 1 column data for this specific method. My code is actually working but I know there's a better way to write this and would love to apply it.</p>
  
  <p>Here's the sample result from stored procedure:
  {{DapperRow, prodid = 'b1', prodname = 'sample product', description = 'test only', qty = '1', remainingstock = '10'}}</p>
  
  <p>Here's the snippet of my code:</p>
  
  <pre><code>     var products = new List&lt;Product&gt;();
              using (var db = DbConnection)
              {
                  var data = //sp call here
  
                  //code for improvement starts here
                  foreach (var row in data)
                  {
                      foreach (var col in row)
                      {
                          if (col.Key == "prodname")
                          {
                              var product = new Product
                              {
                                  DisplayResult = col.Value
                              };
                              products.Add(product);
                              break; //skip the remaining columns
                          }
                      }
                  }
                  //to here
              }
  
          return products;
  </code></pre>
  
  <p>expected result would be:
  products[0].DisplayResult = "sample product"</p>