Skip to content

Commit

Permalink
GitBook: [master] one page modified
Browse files Browse the repository at this point in the history
  • Loading branch information
ethno2405 authored and gitbook-bot committed Oct 5, 2020
1 parent c4e7ae4 commit 123b61a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/cronus-framework/domain-modeling/aggregate.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class Concert : AggregateRoot<ConcertState>

Use the abstract helper class `AggregateRootState<TAggregateRoot, TAggregateRootId>`. Also, you can implement the `IAggregateRootState` by yourself in case inheritance is not a viable option.

To change the state of an aggregate root, define event handlers for each event with the method signature `public void When(Event e) { ... }`.
To change the state of an aggregate root, create method event handlers for each event with method signature `public void When(Event e) { ... }`.

```csharp
public class ConcertState : AggregateRootState<Concert, ConcertId>
Expand All @@ -51,7 +51,7 @@ public class ConcertState : AggregateRootState<Concert, ConcertId>

public List<Performer> Performers { get; set; }

public When(ConcertAnnounced @event)
public void When(ConcertAnnounced @event)
{
// ...
}
Expand Down

0 comments on commit 123b61a

Please sign in to comment.