title: Bulk register IEntityTypeConfiguration<> entity framework core
body: <p>Ok, so i am using entity framework with dot net core and code first migrations. This isn't a problem as such, i just wondered if anyone had come across a better way of doing this.</p>
  
  <p>Currently i have many entity type configurations like so</p>
  
  <pre><code>public class ExampleEntityConfiguration : IEntityTypeConfiguration&lt;ExampleEntity&gt;
  {
     public void Configure(EntityTypeBuilder&lt;ExampleEntity&gt; builder)
     {
        builder.Property(p =&gt; p.Id).ValueGeneratedNever();
  
        // more options here
     }
  }
  </code></pre>
  
  <p>and i register them in my dbcontext like so</p>
  
  <pre><code>protected override void OnModelCreating(ModelBuilder modelBuilder)
  {
    base.OnModelCreating(modelBuilder);
  
    modelBuilder.ApplyConfiguration(new ExampleEntityConfiguration());
  
    // lot's more configurations here
  }
  </code></pre>
  
  <p>has anyone come across or know of a way to register all the <code>IEntityTypeConfiguration</code> interfaces? </p>
  
  <p>It just seems like a lot of repetitive code that could be solved by getting a list of the configurations, looping over them and applying in the context. I just don't know where to start with getting a list of <code>IEntityTypeConfiguration</code> classes that exist in a particular namespace.</p>
  
  <p>Any help/suggestions would be great.</p>