private async Task ChangeUserSponsor(UserMultiAccount userMultiAccount, MatrixPosition matrixPosition) { var parentPosition = await _matrixPositionRepository.GetAsync(matrixPosition.ParentId.Value); userMultiAccount.ChangeSponsor(parentPosition.UserMultiAccountId.Value); await _userMultiAccountRepository.UpdateAsync(userMultiAccount); }
public async Task Handle(UserBoughtMatrixPositionEvent notification, CancellationToken cancellationToken = default(CancellationToken)) { var multiAccount = await _userMultiAccountRepository.GetAsync(notification.MultiAccountId); multiAccount.SetReflink(_reflinkHelper.GenerateReflink()); await _userMultiAccountRepository.UpdateAsync(multiAccount); }
public async Task Execute(Guid multiAccountId, PerformContext context) { context.WriteLine($"UserBoughtMatrixPositionJob started with multiAccountId - {multiAccountId}"); var multiAccount = await _userMultiAccountRepository.GetAsync(multiAccountId); multiAccount.SetReflink(_reflinkHelper.GenerateReflink()); await _userMultiAccountRepository.UpdateAsync(multiAccount); context.WriteLine("UserBoughtMatrixPositionJob completed."); }