Browse Source

Update Domain-Driven-Design-Implementation-Guide.md

pull/6374/head
Halil İbrahim Kalkan 6 years ago
parent
commit
69b1737d76
  1. 6
      docs/en/Domain-Driven-Design-Implementation-Guide.md

6
docs/en/Domain-Driven-Design-Implementation-Guide.md

@ -669,3 +669,9 @@ public class Issue : AggregateRoot<Guid>
* `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.
Loading…
Cancel
Save