Example #1
0
        public ActionResult <List <ScopeViewModel> > GetApiScopes()
        {
            List <ScopeViewModel> Result = new List <ScopeViewModel>();
            List <ApiScope>       Scopes = Repository.GetApiScopes();

            if (Scopes.Count > 0)
            {
                Result = Scopes.ConvertAll(x => new ScopeViewModel()
                {
                    Name        = x.Name,
                    DisplayName = x.DisplayName
                });
            }
            return(Result);
        }