title: one-to-many insert using dapper dot net
body: <p>I have seen here</p>
  
  <p><a href="https://stackoverflow.com/questions/6387904/how-to-insert-an-ienumerablet-collection-with-dapper-dot-net">How to insert an IEnumerable&lt;T&gt; collection with dapper-dot-net</a></p>
  
  <p>how dapper is able to handle <code>IEnumerable</code> as an input param and dispatch multiple commands for each member of the collection.</p>
  
  <p>In my case I have an <code>IEnumerable&lt;int&gt; Categories</code> and a <code>int SurveyId</code> and I want to insert this one-to-many relationship into a separate mapping table called <code>SurveyCategories</code></p>
  
  <p>Is there a LINQ extension that I could use to concatenate these Categories with the same <code>SurveyId</code>, similar to <code>.Concat()</code>? </p>
  
  <p>Or should I loop through the collection and build up a new list of objects with SurveyId and CategoryId properties?</p>