You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the BankAccountAggregateBalance class used for event sourcing example, an interface ICanApplyEvent<TEvent, TState> is being used to apply an event to modify an object state.
We are invoking this method on a TState object, to apply the TEvent to it. But I find it redundant to pass in the TState object also, on which we apply the event. This is not a static method, but an instance method, so it knows to apply the TEvent on itself. Can you advise what benefit this is providing, and why not use this, instead of the passed TState.
The text was updated successfully, but these errors were encountered:
In the BankAccountAggregateBalance class used for event sourcing example, an interface ICanApplyEvent<TEvent, TState> is being used to apply an event to modify an object state.
We are invoking this method on a TState object, to apply the TEvent to it. But I find it redundant to pass in the TState object also, on which we apply the event. This is not a static method, but an instance method, so it knows to apply the TEvent on itself. Can you advise what benefit this is providing, and why not use this, instead of the passed TState.
The text was updated successfully, but these errors were encountered: