title: Export data as C# / VB format to use them in EF Code First's Database Initialization
body: <p>Some times, sample data is important but boring to generate due to many related tables.
  So, in Entity Framework Code First, I think it's an elegant way to insert them in DropCreateDatabaseIfModelChanges::Seed().</p>
  
  <p>But is there a way to export existing data from database back to a string as C# / VB sentences that insert poco objects?</p>
  
  <p>If it works, we may use it to backup data gracefully, or save to multiple .cs by scenes, switch them as needed to better our test, etc.</p>
  
  <h2>DATABASE EXPORTS AS THE FOLLOWING CODE:</h2>
  
  <pre><code>var students = new List&lt;Student&gt;
  {
      new Student { FirstMidName = "Carson",   LastName = "Alexander", },
      new Student { FirstMidName = "Meredith", LastName = "Alonso",    },
      new Student { FirstMidName = "Arturo",   LastName = "Anand",     },
      // ...
  };
  students.ForEach(s =&gt; context.Students.Add(s));
  context.SaveChanges();
  </code></pre>