Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update index.md #4471

Merged
merged 1 commit into from
Aug 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ Since the scaffolded code will be overwritten, it is best not to modify it direc
- The `DbContext` class contains a partial method called `OnModelCreatingPartial`. An implementation of this method can be added to the partial class for the `DbContext`. It will then be called after `OnModelCreating` is called.
- Model configuration made using the `ModelBuilder` APIs overrides any configuration done by conventions or mapping attributes, as well earlier configuration done on the model builder. This means that code in `OnModelCreatingPartial` can be used to override the configuration generated by the scaffolding process, without the need to remove that configuration.

Finally, remember that starting with EF7, the [T4 templates used to generate code can be customized](xref:core/managing-schemas/scaffolding/templates). This is often a more effective approach that scaffolding with the defaults and then modifying with partial classes and/or methods.
Finally, remember that starting with EF7, the [T4 templates used to generate code can be customized](xref:core/managing-schemas/scaffolding/templates). This is often a more effective approach than scaffolding with the defaults and then modifying with partial classes and/or methods.

## How it works

Expand Down
Loading