Пример #1
0
        // GET: UserProfile
        public ActionResult Index()
        {
            if (Int32.Parse(User.FindFirstValue(ClaimTypes.Role)) == 1)
            {
                var userProfiles = _userProfileRepository.GetAllActiveUserProfiles();
                userProfiles.Sort((x, y) => string.Compare(x.DisplayName, y.DisplayName));

                return(View(userProfiles));
            }
            else
            {
                return(RedirectToAction("Index", "Home"));
            }
        }