From 1bf4599ce935cba6fdb82b603a49b93826609f69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Thu, 23 Jul 2020 17:39:53 +0300 Subject: [PATCH] Update Part-10.md --- docs/en/Tutorials/Part-10.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/en/Tutorials/Part-10.md b/docs/en/Tutorials/Part-10.md index e522f676a9..57aa71f6cb 100644 --- a/docs/en/Tutorials/Part-10.md +++ b/docs/en/Tutorials/Part-10.md @@ -64,6 +64,12 @@ Open the `Books/Book.cs` in the `Acme.BookStore.Domain` project and add the foll public Guid AuthorId { get; set; } ```` +{{if DB=="EF"}} + +> In this tutorial, we preferred to not add a **navigation property** to the `Author` entity (like `public Author Author { get; set; }`). This is due to follow the DDD best practices (rule: refer to other aggregates only by id). However, you can add such a navigation property and configure it for the EF Core. In this way, you don't need to write join queries while getting books with their entities (just like we will done below) which makes your application code simpler. + +{{end}} + ## Database & Data Migration Added a new, required `AuthorId` property to the `Book` entity. But, what about the existing books on the database? They currently don't have `AuthorId`s and this will be a problem when we try to run the application.