From db35d9cafdab849abec91387a65318c523496b1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aykut=20C=C4=B1nc=C4=B1k?= Date: Sat, 23 May 2026 15:33:10 +0300 Subject: [PATCH] Document parameterless constructor requirement for ApplyConfigurationsFromAssembly - Add a NOTE block in entity-framework/core/modeling/index.md describing the parameterless constructor requirement. - Clarify that the constructor may be public or non-public. - Mention that types without one are skipped and a SkippedEntityTypeConfigurationWarning is logged. - Point readers to ModelBuilder.ApplyConfiguration as the manual alternative. Fixes #3207 --- entity-framework/core/modeling/index.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/entity-framework/core/modeling/index.md b/entity-framework/core/modeling/index.md index 35b940efa9..579242928a 100644 --- a/entity-framework/core/modeling/index.md +++ b/entity-framework/core/modeling/index.md @@ -42,6 +42,9 @@ It is possible to apply all configuration specified in types implementing `IEnti > [!NOTE] > The order in which the configurations will be applied is undefined, therefore this method should only be used when the order doesn't matter. +> [!NOTE] +> `ApplyConfigurationsFromAssembly` only instantiates configuration types that have a parameterless constructor; the constructor may be public or non-public. Types whose constructors require parameters are skipped, and a `SkippedEntityTypeConfigurationWarning` is logged. To apply such configurations, instantiate them manually and pass them to . + #### Using `EntityTypeConfigurationAttribute` on entity types Rather than explicitly calling `Configure`, an can instead be placed on the entity type such that EF Core can find and use appropriate configuration. For example: