Skip to content

Commit

Permalink
Update index.md (#4471)
Browse files Browse the repository at this point in the history
  • Loading branch information
mtayyabviz authored Aug 31, 2023
1 parent ab87ccb commit 6c758ef
Showing 1 changed file with 1 addition and 1 deletion.
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

0 comments on commit 6c758ef

Please sign in to comment.