title: How to close SqlConnection automatically after SqlMapper GridReader in 3rd Library
body: <p>Here is  code snippet from my own helper ,But it has some faults.</p>
  
  <pre><code>  /// &lt;summary&gt;
    /// Execute a command that returns multiple result sets, and access each in turn
    /// &lt;/summary&gt;
    public static  SqlMapper.GridReader QueryMultiple(string sql, dynamic param = null, string connectionName = null)
    {
  
        using (SqlConnection connection = GetOpenConnection(connectionName))
  
        { return connection.QueryMultiple(sql, param);}
  
    }
  </code></pre>
  
  <p>QueryMultiple is called and closed manually by external program. Shortly after that, SqlConnection should be closed automatically , how to wrap up my helper? Thanks in advance.</p>