title: How can I return dataset perfectly from SQL?
body: <p>I try to write a winform application:</p>
  
  <p>I dislike below codes:</p>
  
  <pre><code> DataTable dt = new DataTable();
                  dt.Load(dr);
                  ds = new DataSet();
                  ds.Tables.Add(dt);</code></pre>
  
  <p><b>Above part of codes looks unsufficient.How can I best loading dataset?</b></p>
  
  <pre><code>   public class LoadDataset
      {
          public DataSet GetAllData(string sp)
          {
              return LoadSQL(sp);
          }
          private DataSet LoadSQL(string sp)
          {
              SqlConnection con = new SqlConnection(ConfigurationSettings.AppSettings["ConnectionString"].ToString());
              SqlCommand cmd = new SqlCommand(sp, con);
              DataSet ds;
              try
              {
                  con.Open();
  
                  cmd.CommandType = CommandType.StoredProcedure;
                  SqlDataReader dr = cmd.ExecuteReader();
                  DataTable dt = new DataTable();
                  dt.Load(dr);
                  ds = new DataSet();
                  ds.Tables.Add(dt);
                  return ds;
              }
              finally
              {
                  con.Dispose();
                  cmd.Dispose();
              }
          }
      }</code></pre>