ConfigurationRegistrar.AddFromAssembly(Assembly) Method

Definition

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

public virtual System.Data.Entity.ModelConfiguration.Configuration.ConfigurationRegistrar AddFromAssembly (System.Reflection.Assembly assembly);
abstract member AddFromAssembly : System.Reflection.Assembly -> System.Data.Entity.ModelConfiguration.Configuration.ConfigurationRegistrar
override this.AddFromAssembly : System.Reflection.Assembly -> System.Data.Entity.ModelConfiguration.Configuration.ConfigurationRegistrar

Parameters

assembly
Assembly

The assembly containing model configurations to add.

Returns

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

Remarks

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.

Applies to