GetUser Problems And One Different Question

40 Views Asked by At
var user =
                await _userRepository
                    .FirstOrDefaultAsync(_ => _.Id == CurrentUser.Id);

When I attempt to retrieve any user here, it works. However, if the user I'm trying to retrieve has a TenantId, the user is returned as null. By the way, I'm adding the users under the admin claim (I'm doing this). Could this be the source of my issue?

Which claim should I use to add users?

Here's an unrelated question:

Let's assume I've added a new property to the User object or any other object (not an extra property, but a separate column). How can I retrieve this using a DTO from Swagger, or how can I extend an existing DTO to include this new property? I've tried using methods, but I haven't been able to make any of them work. Could you assist me?

0

There are 0 best solutions below