//
        // GET: /Admin/
        public ActionResult Index(int currentPage = 1)
        {
            var roles = (SimpleRoleProvider)Roles.Provider;
            AdminModel result = new AdminModel
            {
                allUsers = new List<UserInfo>(),
                allRoles = roles.GetAllRoles()
            };

            using (ITintheDTestEntities context = new ITintheDTestEntities())
            {
                var user = from u in context.UserProfiles orderby u.UserId select u;

                foreach (UserProfile p in user)
                {
                    result.allUsers.Add(new UserInfo(p));
                }
            }
            return View(result);
        }
        public ActionResult User(string id)
        {
            ITintheDTestEntities context = new ITintheDTestEntities();

            var user = from u in context.UserProfiles orderby u.UserId select u;
            var roles = (SimpleRoleProvider)Roles.Provider;
            AdminModel result = new AdminModel
            {
                allUsers = new List<UserInfo>(),
                allRoles = roles.GetAllRoles()
            };

            foreach (UserProfile p in user)
            {
                if (p.UserId == Convert.ToInt32(id))
                {
                    result.allUsers.Add(new UserInfo(p));
                }
            }

            return View(result);
        }