public async Task <IActionResult> GetAuthorizeButton(string code) { var userClaim = await workContext.GetCurrentUserClaim(); var cachedata = await userCacheService.GetPermissionCacheAsync(userClaim.UserId); var pattern = new Regex(@"^" + code + "-+"); var query = from data in cachedata let matches = pattern.Matches(data.Code) where matches.Count > 0 select data; return(Json(query)); }