title: Reusing database connection with Dapper in .NET Web API
body: <p>Most, if not all, examples of Dapper in .NET I've seen use a structure like this:</p>
  
  <pre><code>    using (SqlConnection conn = new SqlConnection(ConnectionString))
      {
          conn.Open();
          return conn.Query&lt;T&gt;(sql, param);
      }
  </code></pre>
  
  <p>If you have a Web API , is it wise to make a new connection every time a request is made to the server? Or would it be a better pattern to abstract the connection into another class and inject it into each controller so they are using the same connection.</p>
  
  <p>On the surface, it seems like reusing the connection would result in quicker responses but I don't know the nitty gritty of what's going on in a SqlConnection object so I'm not sure if it's a good idea.</p>