title: how to create a DAL using petapoco
body: <p>I need to create a DAL and repositories using petapoco. The difficulty that comes in, is that I dont know how it manages its connections.</p>
  
  <p>If I was using dapper I know how the connection process flows because I control it. I don't know what are the best practices in creating a DAL with petapoco.</p>
  
  <pre><code> public class UserRepository
      {
          public IEnumerable&lt;User&gt; All()
          {
              var db = new PetaPoco.Database("Sqlite_Connection");//this line
              var s = db.Query&lt;User&gt;("SELECT * FROM Users");
              return s.ToList();
          }
      }
  </code></pre>
  
  <p>I would like to place <code>var db = new PetaPoco.Database("Sqlite_Connection");//this line</code>
  in my DALHelper class as a static property but I'm worried about scalability</p>