title: Type not found in context, possible mapping issue
body: <p>I'm trying to use the <code>EntityFramework.BulkInsert</code> extension but I keep getting an exception of <code>Type 'MyEntity.CallDetail' is not found in context 'MyEntity.MyEntities'</code>. I tracked this exception to the <code>DBMapping</code> class in the <code>EntityFramework.MappingAPI</code>. The method that throws it is :</p>
  
  <pre><code>    public IEntityMap this[string typeFullName]
      {
          get
          {
              if (!_tableMappings.ContainsKey(typeFullName))
                  throw new Exception("Type '" + typeFullName + "' is not found in context '" + _contextTypeName + "'");
  
              return _tableMappings[typeFullName];
          }
      }
  </code></pre>
  
  <p>My question is, is this an error in the <code>EntityFramework.MappingAPI</code> or this this something in my code?</p>
  
  <p>My context class:</p>
  
  <pre><code>public partial class MyEntities : DbContext
  {
      public MyEntities()
          : base("name=MyEntities")
      {
      }
  
      protected override void OnModelCreating(DbModelBuilder modelBuilder)
      {
          throw new UnintentionalCodeFirstException();
      }
  
      public virtual DbSet&lt;CallDetail&gt; CallDetail { get; set; }
      public virtual DbSet&lt;PhoneState&gt; PhoneStates { get; set; }
      public virtual DbSet&lt;Skill&gt; Skills { get; set; }
      public virtual DbSet&lt;Team&gt; Teams { get; set; }
      public virtual DbSet&lt;User&gt; Users { get; set; }
      public virtual DbSet&lt;StateLog&gt; StateLogs { get; set; }
  }
  </code></pre>
  
  <p>I'm assuming that the error is caused by everything being <code>DBSet&lt;...&gt;</code> instead of just the type but I may be wrong.</p>
  
  <p>If it is in my code (which is most probable) what do I need to do to make this work?</p>
  
  <p>EDIT: Thanks to @BenRobinson, the issue is due to the EF mapping. I have been able to find that others have been having similar issues with <code>EntityFramework.MappingAPI</code> on DB first models as found <a href="http://efbulkinsert.codeplex.com/workitem/1383" rel="noreferrer">here</a>, <a href="http://efbulkinsert.codeplex.com/workitem/1414" rel="noreferrer">here</a>, and <a href="http://efbulkinsert.codeplex.com/workitem/1464" rel="noreferrer">here</a>. Since I am new to EF, I'm hoping that someone can see an issue in the <code>edmx</code> that could be causing the problem. Below is the info from the edmx file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;edmx:Edmx Version="3.0" xmlns:edmx="http://schemas.microsoft.com/ado/2009/11/edmx"&gt;
      &lt;!-- EF Runtime content --&gt;
      &lt;edmx:Runtime&gt;
          &lt;!-- SSDL content --&gt;
          &lt;edmx:StorageModels&gt;
              &lt;Schema Namespace="my_contactModel.Store" Provider="MySql.Data.MySqlClient" ProviderManifestToken="5.6" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl"&gt;
                  &lt;EntityType Name="call_detail"&gt;
                      ....
                  &lt;/EntityType&gt;
                  &lt;EntityContainer Name="my_contactModelStoreContainer"&gt;
                      &lt;EntitySet Name="call_detail" EntityType="Self.call_detail" Schema="my_contact" store:Type="Tables" /&gt;
                      ....
                  &lt;/EntityContainer&gt;
              &lt;/Schema&gt;&lt;/edmx:StorageModels&gt;
          &lt;!-- CSDL content --&gt;
          &lt;edmx:ConceptualModels&gt;
              &lt;Schema Namespace="MyContactModel" Alias="Self" annotation:UseStrongSpatialTypes="false" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm"&gt;
                  &lt;EntityType Name="CallDetail"&gt;
                      ....
                  &lt;/EntityType&gt;
                  &lt;EntityContainer Name="MyEntities" annotation:LazyLoadingEnabled="true"&gt;
                      &lt;EntitySet Name="CallDetail" EntityType="MyContactModel.CallDetail" /&gt;
                      ....
                  &lt;/EntityContainer&gt;
              &lt;/Schema&gt;
          &lt;/edmx:ConceptualModels&gt;
          &lt;!-- C-S mapping content --&gt;
          &lt;edmx:Mappings&gt;
              &lt;Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2009/11/mapping/cs"&gt;
                  &lt;EntityContainerMapping StorageEntityContainer="my_contactModelStoreContainer" CdmEntityContainer="MyEntities"&gt;
                      &lt;EntitySetMapping Name="CallDetail"&gt;
                          &lt;EntityTypeMapping TypeName="MyContactModel.CallDetail"&gt;
                              &lt;MappingFragment StoreEntitySet="call_detail"&gt;
                                  ....
                              &lt;/MappingFragment&gt;
                          &lt;/EntityTypeMapping&gt;
                      &lt;/EntitySetMapping&gt;
                  &lt;/EntityContainerMapping&gt;
              &lt;/Mapping&gt;
          &lt;/edmx:Mappings&gt;
      &lt;/edmx:Runtime&gt;
  &lt;/edmx:Edmx&gt;
  </code></pre>