src/Shared/EntityFramework/ModelConfiguration/Configuration/ConventionsConfiguration.cs
/// <summary>
///     Discover all conventions in the given assembly and add them to the <see cref="DbModelBuilder" />.
/// </summary>
/// <remarks>
///     This method add all conventions ordered by type name. The order in which conventions are added
///     can have an impact on how they behave because it governs the order in which they are run.
///     All conventions found must have a parameterless public constructor.
/// </remarks>
/// <param name="assembly">The assembly containing conventions to be added.</param>
Discover all conventions in the given assembly and add them to the .
Discover all conventions in the given assembly and add them to the .
public void AddFromAssembly(Assembly assembly)
        {
            Check.NotNull(assembly, "assembly");
            var types = assembly.GetAccessibleTypes()
                .OrderBy(type => type.Name);
            new ConventionsTypeFinder().AddConventions(types, convention => Add(convention));
        }
public void AddFromAssembly ( Assembly assembly ) { Check . NotNull ( assembly , " " ) ; var types = assembly . GetAccessibleTypes ( ) . OrderBy ( type => type . Name ) ; new ConventionsTypeFinder ( ) . AddConventions ( types , convention => Add ( convention ) ) ; }
Discover all conventions in the given assembly and add them to the .
Discover all conventions in the given assembly and add them to the .
assembly
Assembly
The assembly containing conventions to be added.
The assembly containing conventions to be added .
remarks
This method add all conventions ordered by type name. The order in which conventions are added
can have an impact on how they behave because it governs the order in which they are run.
All conventions found must have a parameterless public constructor.
This method add all conventions ordered by type name . The order in which conventions are added can have an impact on how they behave because it governs the order in which they are run . All conventions found must have a parameterless public constructor .