Exemplo n.º 1
0
        public ActionResult Add()
        {
            var ListUser = AccountService.GetAllUsers();
            var ListRole = AccountService.GetAllRoles();

            ViewBag.ListUser = ListUser;
            ViewBag.ListRole = ListRole;
            return(View());
        }
Exemplo n.º 2
0
        public ActionResult Index()
        {
            var ListRole = _accountService.GetAllRoles();

            //var roles = ListRole.ToList();
            //roles.Insert(0, new IdentityRole
            //{
            //    Id = "",
            //    Name = "select a role."
            //});
            ViewBag.ListRole = ListRole;

            return(View());
        }