| | |
| | | .Where(it => it.TraceId == request.TraceId) |
| | | .ProjectToType<GetDbAuditLogsQueryResultItem>() |
| | | .ToListAsync(); |
| | | var userIds = result.ResourceLogs.DistinctSelect(it => it.CreatedUserId.HasValue, it => it.CreatedUserId) |
| | | .Union(result.ExceptionLogs.DistinctSelect(it => it.CreatedUserId.HasValue, it => it.CreatedUserId)) |
| | | .Union(result.DbAuditLogs.DistinctSelect(it => it.CreatedUserId.HasValue, it => it.CreatedUserId)); |
| | | if (userIds.IsNullOrEmpty()) |
| | | var userIds = result.ResourceLogs.DistinctSelect(it => it.CreatedUserId.HasValue, it => it.CreatedUserId!.Value) |
| | | .Union(result.ExceptionLogs.DistinctSelect(it => it.CreatedUserId.HasValue, it => it.CreatedUserId!.Value)) |
| | | .Union(result.DbAuditLogs.DistinctSelect(it => it.CreatedUserId.HasValue, it => it.CreatedUserId!.Value)) |
| | | .ToList(); |
| | | if (userIds.IsNotNull()) |
| | | { |
| | | var users = await repUser.AsQueryable().AsNoTracking() |
| | | .Where(it => userIds.Contains(it.Id)) |