ConfigurationRegistrar.AddFromAssembly Method (Assembly)

 

Discovers all types that inherit from T:System.Data.Entity.ModelConfiguration.Configuration.Types.EntityTypeConfiguration or T:System.Data.Entity.ModelConfiguration.Configuration.Types.ComplexTypeConfiguration in the given assembly and adds an instance of each discovered type to this registrar.

Namespace:   System.Data.Entity.ModelConfiguration.Configuration
Assembly:  EntityFramework (in EntityFramework.dll)

public virtual ConfigurationRegistrar AddFromAssembly(
	Assembly assembly
)

Parameters

assembly
Type: System.Reflection.Assembly

The assembly containing model configurations to add.

Return Value

Type: System.Data.Entity.ModelConfiguration.Configuration.ConfigurationRegistrar

The same ConfigurationRegistrar instance so that multiple calls can be chained.

Note that only types that are abstract or generic type definitions are skipped. Every type that is discovered and added must provide a parameterless constructor.