public IActionResult DeleteScope(int apiId, int scopeId)
        {
            var scope = _configurationDbContext.Set <ApiScope>()
                        .Include(x => x.ApiResource)
                        .FirstOrDefault(x => x.Id == scopeId);

            return(View(ScopeModel.FromEntity(scope)));
        }
        public IActionResult EditScope(int apiId, int scopeId)
        {
            var api = _configurationDbContext.ApiResources
                      .Include("Scopes.UserClaims")
                      .FirstOrDefault(x => x.Id == apiId);

            if (scopeId != 0)
            {
                var scopeEntity = api.Scopes.FirstOrDefault(x => x.Id == scopeId);
                return(View(ScopeModel.FromEntity(scopeEntity)));
            }
            else
            {
                return(View(new ScopeModel
                {
                    ApiResourceId = api.Id,
                    ApiResourceName = api.Name,
                    ApiResource = api,
                }));
            }
        }