title: EntityFramework.BulkInsert issues inserting into database
body: <p>I am attempting to use the <a href="https://efbulkinsert.codeplex.com/" rel="nofollow">EntityFramework.BulkInsert</a> library for taking advantage of EF6 and SqlBulkCopy.</p>
  
  <p>The documentation seems very straight forward, however, I cannot get any data populated into the database.</p>
  
  <p>For a complex example, here is the code:</p>
  
  <pre><code>public void WriteChunkNoAsync(int chunkCount, bool forceSave = false)
  {
      Chunking.Entities.Add(this);
      if (forceSave || Chunking.Entities.Count % chunkCount == 0)
      {
          using (var db = new FlatESContainer())
          {
              //db.Entity.AddRange(Chunking.Entities); //This will work
              db.BulkInsert(Chunking.Entities);
              Chunking.Entities = new List&lt;Entity&gt;();
              db.SaveChanges();
          }
      }
  }
  </code></pre>
  
  <p>This code will basically insert into a global list until the list count is divisible by chunckCount.</p>
  
  <p>The AddRange function works just fine. So, we decided to create a very simple database with a single table called "Test" and here is the issue we ran into:</p>
  
  <pre><code>List&lt;Test&gt; tests = new List&lt;Test&gt;();
  for (int i = 0; i &lt; 1000; i++)
  {
      tests.Add(new Test());
  }
  
  using (var context = new SimpleContainer())
  {
      //This works fine
      context.Tests.AddRange(tests);
      //This causes an exception: Type 'TestSimpleDatabase.Test' is not found in context 'TestSimpleDatabase.SimpleContainer'
      context.BulkInsert(tests);
      context.SaveChanges();
  }
  </code></pre>
  
  <p>I believe these are separate issues but maybe someone in the stackoverflow community has any idea on why we are having this issue.</p>