dotnet / dotnet/efcore

Add a service to configure conventions

Open
#35,914 2 comments 2 reactions 0 assignees View on GitHub
area-model-building
Dominant language
C#
Stars
14.8k
Forks
3.4k
PR merge metrics
PR metrics pending

Description

It will be similar to `IModelCustomizer`:

```C#
public interface IConventionCustomizer
{
///
/// Sets model defaults and configures conventions before they run for a given context.
///
///
/// If any instance data from is
/// used when building the model, then the implementation of
/// also needs to be updated to ensure the model is cached correctly.
///
///
/// The builder being used to set defaults and configure conventions that will be used to build the model for this context.
///
///
/// The context instance that the model is being created for.
///
void Customize(ModelConfigurationBuilder configurationBuilder, DbContext context);
}
```

The default implementation will call `context.ConfigureConventions(configurationBuilder)`;

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.