예제 #1
0
        // GET: Administration
        public ActionResult Index()
        {
            AdministrationVM viewModel = new AdministrationVM();

            viewModel.Orders        = new OrderManager().GetAllOrders();
            viewModel.Messages      = new MessageManager().GetAllMessages();
            viewModel.Users         = new UserManager().GetAllUsers();
            viewModel.Subscriptions = new SubscriptionManager().GetAllSubscriptions();

            return(View(viewModel));
        }
예제 #2
0
        public async Task <IActionResult> Index()
        {
            var authClients      = SqlHelper.Query <AuthClient>($"SELECT * FROM AuthClients ORDER BY IsActive DESC, ClientName", connectionString).ToList();
            var authApiResources = SqlHelper.Query <AuthApiResources>($"SELECT * FROM AuthApiResources ORDER BY IsActive DESC, Name", connectionString).ToList();
            var authScopes       = SqlHelper.Query <AuthScope>($"SELECT * FROM AuthScopes ORDER BY ScopeName", connectionString).ToList();
            var vm = new AdministrationVM
            {
                AuthClient       = authClients,
                AuthApiResources = authApiResources,
                AuthScopes       = authScopes
            };

            return(View(vm));
        }