title: .net SQL Server stored procs wrapper class structure
body: <p>I'm looking to write a C# SQL Server wrapper to call some stored procedures.  If I was writing a single function I'd do something like the following (which I think is correct/proper):</p>
  
  <pre><code>void RunStoredProc1(object arg1)
  {
    using(SqlConnection conn = new SqlConnection(connStr)){
      try{
        SqlCommand cmd = new SqlCommand("storedProc1", conn);
        cmd.CommandType = CommandType.StoredProcedure;
        cmd.Parameters.AddWithValue("@input1", arg1);
  
        conn.Open();
        cmd.ExecuteNonQuery();
      } catch (Exception ex){
        //handle the exception appropriately.
      }
    }
  }
  </code></pre>
  
  <p>The problem I'm having is that it seems like a lot of repeated code... every function will have the same using/try(open/execute)/catch code, and it'd be nice to have it all in only one place.  Is there a clean way of doing this?  How about for queries that I'd want to use a data reader on?</p>