From c33c431dd166738b640059208b666a7264422d23 Mon Sep 17 00:00:00 2001 From: Kaypee Date: Mon, 16 Jan 2023 09:21:27 +0000 Subject: [PATCH] Resolve identified PR issues --- entity-framework/core/what-is-new/ef-core-7.0/whatsnew.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/entity-framework/core/what-is-new/ef-core-7.0/whatsnew.md b/entity-framework/core/what-is-new/ef-core-7.0/whatsnew.md index 25894d4980..bf9a0ca155 100644 --- a/entity-framework/core/what-is-new/ef-core-7.0/whatsnew.md +++ b/entity-framework/core/what-is-new/ef-core-7.0/whatsnew.md @@ -1029,7 +1029,7 @@ By default, EF Core maps an inheritance hierarchy of .NET types to a single data ### TPC database schema -The TPC strategy is similar to the TPT strategy except that a different table is created for every _concrete_ type in the hierarchy, but tables are **not** created for _abstract_ types--hence the name “table-per-concrete-type”. As with TPT, the table itself indicates the type of object saved. However, unlike TPT mapping, each table contains columns for every property in the concrete type and its base types. TPC database schemas are denormalized. +The TPC strategy is similar to the TPT strategy except that a different table is created for every _concrete_ type in the hierarchy, but tables are **not** created for _abstract_ types--hence the name “table-per-concrete-type”. As with TPT, the table itself indicates the type of saved object. However, unlike TPT mapping, each table contains columns for every property in the concrete type and its base types. TPC database schemas are denormalized. For example, consider mapping this hierarchy: @@ -1594,9 +1594,9 @@ Removing existing conventions is a start, but what about adding completely new m The [table-per-hierarchy inheritance mapping strategy](xref:core/modeling/inheritance) requires a discriminator column to specify which type is represented in any given row. By default, EF uses an unbounded string column for the discriminator, which ensures that it will work for any discriminator length. However, constraining the maximum length of discriminator strings can make for more efficient storage and queries. Let's create a new convention that will do that. -EF Core model building conventions are triggered based on changes being made to the model as it is being built. This keeps the model up-to-date as the explicit configuration is made, mapping attributes are applied, and other conventions run. To participate in this, every convention implements one or more interfaces which determine when the convention will be triggered. For example, a convention that implements will be triggered whenever a new entity type is added to the model. Likewise, a convention that implements both and will be triggered whenever either a key or a foreign key is added to the model. +EF Core model building conventions are triggered based on changes being made to the model as it is being built. This keeps the model up-to-date as explicit configuration is made, mapping attributes are applied, and other conventions run. To participate in this, every convention implements one or more interfaces which determine when the convention will be triggered. For example, a convention that implements will be triggered whenever a new entity type is added to the model. Likewise, a convention that implements both and will be triggered whenever either a key or a foreign key is added to the model. -Knowing which interfaces to implement can be tricky, since the configuration made to the model at one point may be changed or removed at a later point. For example, a key may be created by convention, but then later replaced when a different key is configured explicitly. +Knowing which interfaces to implement can be tricky, since configuration made to the model at one point may be changed or removed at a later point. For example, a key may be created by convention, but then later replaced when a different key is configured explicitly. Let's make this a bit more concrete by making a first attempt at implementing the discriminator-length convention: @@ -1784,7 +1784,7 @@ EntityType: Post Title (string) Required MaxLength(512) ``` -So why didn't our convention override the explicitly configured max length? The answer is that EF Core keeps track of how every piece of configuration was made. This is represented by the enum. The different kinds of configurations are: +So why didn't our convention override the explicitly configured max length? The answer is that EF Core keeps track of how every piece of configuration was made. This is represented by the enum. The different kinds of configuration are: - `Explicit`: The model element was explicitly configured in `OnModelCreating` - `DataAnnotation`: The model element was configured using a mapping attribute (aka data annotation) on the CLR type