238
CHAPTER 6 | Tackle Business Complexity in a Microservice with DDD and CQRS Patterns
IIdentityService identityService)
{
// ...Parameter validations...
}
public
async Task
HandleAsync
(OrderStartedDomainEvent orderStartedEvent)
{
var
cardTypeId = (orderStartedEvent.
CardTypeId
!=
0
) ? orderStartedEvent.
CardTypeId
:
1
;
var
userGuid = _identityService.
GetUserIdentity
();
var
buyer = await _buyerRepository.
FindAsync
(userGuid);
bool
buyerOriginallyExisted = (buyer ==
Dostları ilə paylaş: