title: Use IEntityTypeConfiguration with a base entity
body: <p>In EF Core 2.0, we have the ability to derive from <code>IEntityTypeConfiguration</code> for cleaner Fluent API mappings (<a href="https://docs.microsoft.com/en-us/ef/core/what-is-new/#self-contained-type-configuration-for-code-first" rel="noreferrer">source</a>).</p>
  
  <p>How can I extend this pattern to utilize a base entity? In the example below, how can I have a <code>BaseEntityConfiguration</code> to reduce duplication in <code>LanguageConfiguration</code> and <code>MaintainerConfiguration</code>, modifying properties that are in the <code>BaseEntity</code> only in the <code>BaseEntityConfiguration</code>? What would such a <code>BaseEntityConfiguration</code> look like; and how would it be used, if at all, in <code>OnModelCreating()</code>? See the TODOs in-code near the end of the example.</p>
  
  <p>Example:</p>
  
  <pre><code>public abstract class BaseEntity
  {
      public long Id { get; set; }
      public DateTime CreatedDateUtc { get; set; }
      public DateTime? ModifiedDateUtc { get; set; }
  }
  
  public class Language : BaseEntity
  {
      public string Iso6392 { get; set; }
      public string LocalName { get; set; }
      public string Name { get; set; }
  }
  
  public class Maintainer : BaseEntity
  {
      public string Email { get; set; }
      public string Name { get; set; }
  }
  
  public class FilterListsDbContext : DbContext
  {
      public FilterListsDbContext(DbContextOptions options) : base(options)
      {
      }
  
      public DbSet&lt;Language&gt; Languages { get; set; }
      public DbSet&lt;Maintainer&gt; Maintainers { get; set; }
  
      protected override void OnModelCreating(ModelBuilder modelBuilder)
      {
          //TODO: Possibly add something like BaseEntityConfiguration?
          modelBuilder.ApplyConfiguration(new LanguageConfiguration());
          modelBuilder.ApplyConfiguration(new MaintainerConfiguration());
      }
  }
  
  public class LanguageConfiguration : IEntityTypeConfiguration&lt;Language&gt;
  {
      public void Configure(EntityTypeBuilder&lt;Language&gt; entityTypeBuilder)
      {
          //TODO: Move this to something like BaseEntityConfiguration?
          entityTypeBuilder.Property(b =&gt; b.CreatedDateUtc).HasDefaultValueSql("CURRENT_TIMESTAMP");
      }
  }
  
  public class MaintainerConfiguration : IEntityTypeConfiguration&lt;Maintainer&gt;
  {
      public void Configure(EntityTypeBuilder&lt;Maintainer&gt; entityTypeBuilder)
      {
          //TODO: Move this to something like BaseEntityConfiguration?
          entityTypeBuilder.Property(b =&gt; b.CreatedDateUtc).HasDefaultValueSql("CURRENT_TIMESTAMP");
      }
  }
  </code></pre>