private void When(ClaimRequestAutoSubstantiatedEvent @event) { _id = new Guid(@event.ClaimRequestId); _claimAmount = @event.Amount.Dollars(); _claimType = @event.ClaimType; CurrentClaimState = ClaimRequestStateEnum.Substantiated; }
private void RaiseClaimRequestAutoSubstantiatedEvent(SubmitClaimRequest command) { var claimAutoSubstantiated = new ClaimRequestAutoSubstantiatedEvent { Amount = command.Amount, ClaimRequestId = command.ClaimRequestId, ClaimType = command.ClaimType, CompanyId = command.CompanyId, DateOfTransaction = command.DateOfTransaction, ParticipantId = command.ParticipantId, ProviderName = command.ProviderName, Source = command.Source, }; ApplyEvent(claimAutoSubstantiated, @event => _state.Apply(@event)); }