public override Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next) { if (User != null && User.Identity.IsAuthenticated) { _customerTypeRepo.SetLoggedInUserId(GetUserId()); _customerTypeRepo.SetIsAdmin(GetIsUserAdmin()); } return(base.OnActionExecutionAsync(context, next)); }