title: Entity Framework Context failing with ReflectionTypeLoadException
body: <p>I have a simple Entity Framework Code First context for persisting events as they arrive from the bus. The context is :</p>
  
  <pre><code>public class MyContext : DbContext
  {
      public MyContext (DbConnection connection)
          : base(connection, false)
      {
  
          Database.SetInitializer&lt;MyContext&gt;(null);
          Configuration.AutoDetectChangesEnabled = true;
      }
  
      public DbSet&lt;MyEvent&gt; MyEvents { get; set; }
  
  }
  </code></pre>
  
  <p>where MyEvent is</p>
  
  <pre><code>public class MyEvent
  {
      public int Id { get; set; }
  
      public string Source { get; set; }
  
      public string MessageId { get; set; }
  
      public DateTime EventDate { get; set; }
  }
  </code></pre>
  
  <p>Now, when I try to access the context.MyEvents collection I get a ReflectionTypeLoadException</p>
  
  <blockquote>
    <p>Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.</p>
  </blockquote>
  
  <p>with LoaderException</p>
  
  <blockquote>
    <p>"Method 'ToCombinedRows' in type 'XXXX' from assembly 'YYYY' does not have an implementation."</p>
  </blockquote>
  
  <p>Now this is <em>really</em> strange as the type XXXX is completely unrelated to the object being persisted and has no reason to have a method of this name. </p>
  
  <p>All the objects are defined in the same assembly, and I am running from an integration test project, with references CopyLocal set to true. Does anyone know how to get my context to talk to the database?</p>