diff --git a/src/content/docs/dotnet-0.15/domain/state.md b/src/content/docs/dotnet-0.15/domain/state.md index 577292d..9e6b249 100644 --- a/src/content/docs/dotnet-0.15/domain/state.md +++ b/src/content/docs/dotnet-0.15/domain/state.md @@ -30,7 +30,7 @@ public record BookingState : State { 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 }; } @@ -110,4 +110,4 @@ public record BookingState { } ``` -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. \ No newline at end of file +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. diff --git a/src/content/docs/dotnet-next/domain/state.md b/src/content/docs/dotnet-next/domain/state.md index 9fee0cf..45461e5 100644 --- a/src/content/docs/dotnet-next/domain/state.md +++ b/src/content/docs/dotnet-next/domain/state.md @@ -26,7 +26,7 @@ public record BookingState : State { 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 }; } @@ -113,4 +113,4 @@ public record BookingState { } ``` -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). \ No newline at end of file +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).