title: insert list of objects with linq-to-sql
body: <p>I have a list of objects that I'm inserting in a database with linq-to-sql.
  At the moment, I'm using a foreach loop that adds each element and that looks roughly like this:</p>
  
  <pre><code>foreach (o in List&lt;MyObjectModel)
  {
    using MyDataContext
    {
       TheLinqToSqlTableModel TheTable = new TheLinqToSqlTableModel();
  
       TheTable.Fieldname = o.Fieldname;
       .... repeat for each field
  
       MyDataContext.TheTablename.InsertOnSubmit(TheTable);
       MyDataContext.SubmitChanges();
  
    }
  }
  </code></pre>
  
  <p>Is there a better way to insert a list of objects in a DB using linq-to-sql?</p>
  
  <p>Thanks for your suggestions.</p>