示例#1
0
        public async Task <IActionResult> GetAll()
        {
            var shortUrlModels = await _repository.GetAll();

            var claims = from c in User.Claims select new MyClaim {
                Type = c.Type, Value = c.Value
            };

            var response = new ModelsAndClaims {
                ShortUrlModels = shortUrlModels, MyClaims = claims
            };

            return(new JsonResult(response));
        }
示例#2
0
        public async Task <IActionResult> Index()
        {
            ModelsAndClaims modelsAndClaims = await _httpClient.GetAllAsync();

            return(View(modelsAndClaims));
        }