public async Task <ParticipantModel[]> GetAllAsync() { _logger.Information("Getting all participants..."); var participants = await _repository.GetAllAsync(); var participantModels = _mapper.Map <ParticipantModel[]>(participants); _logger.Information($"All participants were successfully loaded (count = {participantModels.Length})"); return(participantModels); }
public async Task <UserAccountModel[]> GetAllAsync() { _logger.Information("Getting all user accounts..."); var userAccounts = await _repository.GetAllAsync(); userAccounts.ForEachOfEnumerable(userAccount => ConvertDateTimeValuesToUtc(userAccount)); var userAccountModels = _mapper.Map <UserAccountModel[]>(userAccounts); _logger.Information($"All user accounts were successfully loaded (count = {userAccountModels.Length})"); return(userAccountModels); }