Ejemplo n.º 1
0
        private async Task UpdateUserProfilesAsync(Lottery lottery, IEnumerable <AddKudosLogDto> kudosLogs, UserAndOrganizationDto userOrg)
        {
            if (lottery.Status != (int)LotteryStatus.RefundLogsCreated)
            {
                return;
            }

            var userIds = kudosLogs.Select(x => x.ReceivingUserIds.First());

            await _kudosService.UpdateProfilesFromUserIdsAsync(userIds, userOrg);

            lottery.Status = (int)LotteryStatus.Refunded;

            await _uow.SaveChangesAsync(userOrg.UserId);
        }