From 69b1737d7646712bf0defd771058c18bf83210d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Thu, 26 Nov 2020 13:20:14 +0300 Subject: [PATCH] Update Domain-Driven-Design-Implementation-Guide.md --- docs/en/Domain-Driven-Design-Implementation-Guide.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/en/Domain-Driven-Design-Implementation-Guide.md b/docs/en/Domain-Driven-Design-Implementation-Guide.md index 137549c672..6b7e60c80a 100644 --- a/docs/en/Domain-Driven-Design-Implementation-Guide.md +++ b/docs/en/Domain-Driven-Design-Implementation-Guide.md @@ -669,3 +669,9 @@ public class Issue : AggregateRoot * `AssignToAsync` throws exception if the business rule doesn't meet. * Finally, if everything is correct, `AssignedUserId` property is set. +This method perfectly guarantee to apply the business logic when you want to assign an issue to a user. However, it has some problems; + +* It makes the entity class **depends on an external service** which makes the entity **complicated**. +* It makes **hard to use** the entity. The code that uses the entity now needs to inject `IUserIssueService` and pass to the `AssignToAsync` method. + +An alternative way of implementing this business logic is to introduce a **Domain Service**, which will be explained later. \ No newline at end of file