title: Batch insert data in table that has a parent child relationship
body: <p>I am working on a function that would insert a data in a table that has a parent child relationship. My current implementation is to iterate the objects to insert them one by one. I am thinking of batch insert to lessen the database round trip using SQL OR C# OR PetaPoco. Any one has an idea?  </p>
  
  <pre><code>PersonID    ParentID    LastName    FirstName
  1            (null)       John        Doe
  2              1          Mary        Doe
  3              1          Ken         Doe
  4              2          Jane        Doe
  </code></pre>
  
  <p><a href="http://sqlfiddle.com/#!7/5edc6/6" rel="nofollow noreferrer">http://sqlfiddle.com/#!7/5edc6/6</a></p>