Base solution for your next web application
Open Closed

GetUserByIdAsync - Roles null #1216


User avatar
0
ratosoft created

Hi everyone.

I have an user in a Admin Role.

Why when I invoke _userManager.GetUserByIdAsync my Roles property is null, but when I call _userManager.GetRolesAsync for the same user I receive the role correctly?

Check out this images below.


1 Answer(s)
  • User Avatar
    0
    ratosoft created

    Hello.

    The lazy loading configuration was disabled. That's why.