Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/content/docs/dotnet-0.15/domain/state.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public record BookingState : State<BookingState> {
public override BookingState When(object @event)
=> @event switch {
RoomBooked booked => this with { Price = booked.Price },
BookingImported imported => this with { Price = booked.Price },
BookingImported imported => this with { Price = imported.Price },
_ => this
};
}
Expand Down Expand Up @@ -110,4 +110,4 @@ public record BookingState<BookingId> {
}
```

The `BookingState` type will have a property named `Id` of type `BookingId`. You don't need to set it manually as it will be provided when the state object is recreated from events by the command service.
The `BookingState` type will have a property named `Id` of type `BookingId`. You don't need to set it manually as it will be provided when the state object is recreated from events by the command service.
4 changes: 2 additions & 2 deletions src/content/docs/dotnet-next/domain/state.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public record BookingState : State<BookingState> {
public override BookingState When(object @event)
=> @event switch {
RoomBooked booked => this with { Price = booked.Price },
BookingImported imported => this with { Price = booked.Price },
BookingImported imported => this with { Price = imported.Price },
_ => this
};
}
Expand Down Expand Up @@ -113,4 +113,4 @@ public record BookingState<BookingId> {
}
```

The `BookingState` type will have a property named `Id` of type `BookingId`. You don't need to set it manually as it will be provided when the state object is recreated from events by the [command service](../../application/app-service).
The `BookingState` type will have a property named `Id` of type `BookingId`. You don't need to set it manually as it will be provided when the state object is recreated from events by the [command service](../../application/app-service).