public async System.Threading.Tasks.Task <IViewComponentResult> InvokeAsync() { int orderNum = 0; if (HttpContext.User.Identity.IsAuthenticated) { orderNum = await httpClientService.CountUserOrderDetailAsync(UserClaimsPrincipal.FindFirst(ClaimTypes.NameIdentifier).Value); } return(View(orderNum)); }