title: Web Api return DataSet with Get
body: <p>I had code in which it works as it returned I assume to proper object type</p>
  
  <p><strong>jquery</strong></p>
  
  <pre><code> $(document).ready(function () {
          jQuery.support.cors = true;
          $.ajax({
              url: '/api/News/5',
              type: 'GET',
              dataType: 'json',
              success: function (data) {
                  WriteResponses(data);
              },
              error: function (x, y, z) {
                  alert(x + '\n' + y + '\n' + z);
              }
          });
  
          //Displays in a Table
          function WriteResponses(allNews) {
              var strResult = "&lt;table&gt;&lt;th&gt;Name&lt;/th&gt;&lt;th&gt;Student ID&lt;/th&gt;&lt;th&gt;Gender&lt;/th&gt;&lt;th&gt;Age&lt;/th&gt;";
              $.each(allNews, function (index, news) {
                  strResult += "&lt;tr&gt;&lt;td&gt;" + news.id + "&lt;/td&gt;&lt;td&gt; " + news.title + "&lt;/td&gt;&lt;td&gt;" + news.body + "&lt;/td&gt;&lt;td&gt;" + news.body + "&lt;/td&gt;&lt;/tr&gt;";
              });
              strResult += "&lt;/table&gt;";
              $("#divResult").html(strResult);
          }
  
      });
  </code></pre>
  
  <p><strong>Web Api</strong> </p>
  
  <pre><code>  public HttpResponseMessage GetNews(int? id)
      {
          int groupValue = 4;
  
          var tips = (from s in db.tblTips
                    .Where(d =&gt; d.@group == groupValue)   
                      select s);
  
          if (tips == null)
          {
              return Request.CreateErrorResponse(HttpStatusCode.NotFound, "Not found for the Given ID");
          }
          else
          {
              return Request.CreateResponse(HttpStatusCode.OK, tips);
          }
      }
  </code></pre>
  
  <p><strong>However, That worked above as I was returning IQueryable</strong></p>
  
  <p>Instead, I have a DataSet that I want to return but it is undefined in the code ( and yes I have changed the names in the variable construction of the table  e.g.   <strong>news.StormOut</strong>  etc..</p>
  
  <p>So this is what I am trying to return, I really do not like working with DataSets and DataTables , so I'm open to changing it....</p>
  
  <pre><code>   [Route("GetCheckBox/{id?}")]
      public HttpResponseMessage GetCheckBoxes(int? id)
      {
          DataSet ds = new DataSet();
          using (SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["StormConnString"].ToString()))
          {
  
              string querystring = "SELECT StormOut, StormYes, StormNo FROM tblSignOnOff WHERE id = " + id;  // 3521 "
              SqlCommand cmd = new SqlCommand(querystring, conn);
              SqlDataAdapter da = new SqlDataAdapter(cmd);
              da.Fill(ds, "Data");
  
          }
  
          //return ds;
          return Request.CreateResponse(HttpStatusCode.OK, ds);
  
      }
  </code></pre>