示例#1
0
        public async Task <ActionResult> GetPolicies()
        {
            if (!await _representationManager.CheckRepresentationExistsAsync(this, CachingStoreNames.GetPoliciesStoreName))
            {
                return(new ContentResult
                {
                    StatusCode = 412
                });
            }

            var policies = await _policyActions.GetPolicies();

            await _representationManager.AddOrUpdateRepresentationAsync(this, CachingStoreNames.GetPoliciesStoreName);

            return(new OkObjectResult(policies));
        }
        public async Task <ActionResult> GetPolicies()
        {
            var policies = await _policyActions.GetPolicies().ConfigureAwait(false);

            return(new OkObjectResult(policies));
        }