You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In IdentityService.cs for each function call it read ApplicationUser from database
var user = _userManager.Users.SingleOrDefault(u => u.Id == userId);
Doas this made multiple connection to database if i call it multiple time?
if it's true how can i reuse ApplicationUser?
My problem is in AuthorizationBehaviour it call _identityService.IsInRoleAsync and _identityService.AuthorizeAsync.
In my handeler i need user roles and wrote another function in IdentityService and get role list.
Doas this make 3 connection for retriving ApplicationUser object?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello
In
IdentityService.cs
for each function call it readApplicationUser
from databaseDoas this made multiple connection to database if i call it multiple time?
if it's true how can i reuse
ApplicationUser
?My problem is in
AuthorizationBehaviour
it call_identityService.IsInRoleAsync
and_identityService.AuthorizeAsync
.In my handeler i need user roles and wrote another function in
IdentityService
and get role list.Doas this make 3 connection for retriving
ApplicationUser
object?Beta Was this translation helpful? Give feedback.
All reactions