コード例 #1
0
        public async Task <ActionResult> ViewAccounts()
        {
            // this will return a list of all accounts in the system
            var IPAddress = Server.HtmlEncode(Request.UserHostAddress);

            ViewBag.IPAddress = IPAddress;

            IEnumerable <AccountAdminViewModel> viewModel = new List <AccountAdminViewModel>();

            using (var provider = new AccountProvider(UserManager))
            {
                viewModel = await provider.ReturnFirstNAccounts(0);
            }

            return(View(viewModel));
        }