Share via


IEntityTypeConfiguration<TEntity> Interface

Definition

Allows configuration for an entity type to be factored into a separate class, rather than in-line in OnModelCreating(ModelBuilder). Implement this interface, applying configuration for the entity in the Configure(EntityTypeBuilder<TEntity>) method, and then apply the configuration to the model using ApplyConfiguration<TEntity>(IEntityTypeConfiguration<TEntity>) in OnModelCreating(ModelBuilder).

public interface IEntityTypeConfiguration<TEntity> where TEntity : class
type IEntityTypeConfiguration<'Entity (requires 'Entity : null)> = interface
Public Interface IEntityTypeConfiguration(Of TEntity)

Type Parameters

TEntity

The entity type to be configured.

Remarks

See Modeling entity types and relationships in EF Core for more information and examples.

Methods

Configure(EntityTypeBuilder<TEntity>)

Configures the entity of type TEntity.

Applies to