public async Task <UserDto> GetUser() { ApplicationUser user = await _userManager.GetUserAsync(User); bool IsAdmin = await _userManager.IsInRoleAsync(user, "Admin"); UserDto userDto = UserDto.GetFromApplicationUser(user); userDto.IsAdmin = IsAdmin; return(userDto); }