diff --git a/entity-framework/core/modeling/relationships/one-to-many.md b/entity-framework/core/modeling/relationships/one-to-many.md index 9a1aed9023..369d829986 100644 --- a/entity-framework/core/modeling/relationships/one-to-many.md +++ b/entity-framework/core/modeling/relationships/one-to-many.md @@ -152,7 +152,7 @@ As before, this relationship is [discovered by convention](xref:core/modeling/re --> [!code-csharp[OneToManyRequiredShadow](../../../../samples/core/Modeling/Relationships/OneToMany.cs?name=OneToManyRequiredShadow)] -In some cases, you may not want a foreign key property in your model, since foreign keys are a detail of how the relationship is represented in the database, which is not needed whe using the relationship in a purely object-oriented manner. However, if entities are going to be serialized, for example to send over a wire, then the foreign key values can be a useful way to keep the relationship information intact when the entities are not in an object form. It is therefore often pragmatic to keep foreign key properties in the .NET type for this purpose. Foreign key properties can be private, which is often a good compromise to avoid exposing the foreign key while allowing its value to travel with the entity. +In some cases, you may not want a foreign key property in your model, since foreign keys are a detail of how the relationship is represented in the database, which is not needed when using the relationship in a purely object-oriented manner. However, if entities are going to be serialized, for example to send over a wire, then the foreign key values can be a useful way to keep the relationship information intact when the entities are not in an object form. It is therefore often pragmatic to keep foreign key properties in the .NET type for this purpose. Foreign key properties can be private, which is often a good compromise to avoid exposing the foreign key while allowing its value to travel with the entity. Following on from the previous two examples, this example removes the foreign key property from the dependent entity type. EF therefore creates a [shadow foreign key property](xref:core/modeling/shadow-properties) called `BlogId` of type `int`.