From c5338232d729144204a17e44cc3d800cd4803407 Mon Sep 17 00:00:00 2001 From: Tom Dykstra Date: Thu, 29 Aug 2019 08:36:34 -0700 Subject: [PATCH] Add links to fluent api section (#14041) --- aspnetcore/data/ef-rp/complex-data-model.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aspnetcore/data/ef-rp/complex-data-model.md b/aspnetcore/data/ef-rp/complex-data-model.md index 8658654bca58..ceb62b99ae2f 100644 --- a/aspnetcore/data/ef-rp/complex-data-model.md +++ b/aspnetcore/data/ef-rp/complex-data-model.md @@ -385,7 +385,7 @@ public ICollection Courses { get; set; } By convention, EF Core enables cascade delete for non-nullable FKs and for many-to-many relationships. This default behavior can result in circular cascade delete rules. Circular cascade delete rules cause an exception when a migration is added. -For example, if the `Department.InstructorID` property was defined as non-nullable, EF Core would configure a cascade delete rule. In that case, the department would be deleted when the instructor assigned as its administrator is deleted. In this scenario, a restrict rule would make more sense. The following fluent API would set a restrict rule and disable cascade delete. +For example, if the `Department.InstructorID` property was defined as non-nullable, EF Core would configure a cascade delete rule. In that case, the department would be deleted when the instructor assigned as its administrator is deleted. In this scenario, a restrict rule would make more sense. The following [fluent API](#fluent-api-alternative-to-attributes) would set a restrict rule and disable cascade delete. ```csharp modelBuilder.Entity() @@ -1089,7 +1089,7 @@ For example, if the `Department.InstructorID` property was defined as non-nullab * EF Core configures a cascade delete rule to delete the department when the instructor is deleted. * Deleting the department when the instructor is deleted isn't the intended behavior. -* The following fluent API would set a restrict rule instead of cascade. +* The following [fluent API](#fluent-api-alternative-to-attributes) would set a restrict rule instead of cascade. ```csharp modelBuilder.Entity()