ArmedCards.Web.Controllers.ProfileController.Index C# (CSharp) Метод

Index() приватный Метод

private Index ( int id ) : System.Web.Mvc.ActionResult
id int
Результат System.Web.Mvc.ActionResult
        public ActionResult Index(int id)
        {
            Entities.User viewedProfile = _selectUser.Execute(id);

            Int32 currentUserId = Authentication.Security.CurrentUserId;

            if (viewedProfile != null)
            {
                Entities.Models.Profile.Profile model = new Entities.Models.Profile.Profile();
                model.ViewedProfile = viewedProfile;
                model.MyProfile = viewedProfile.UserId == currentUserId;

                Entities.Filters.GamePlayer.SelectForUser filter = new Entities.Filters.GamePlayer.SelectForUser();
                filter.UserId = id;
                filter.PlayerType = Entities.Enums.GamePlayerType.Player;

                model.GameProfiles = _selectGamePlayer.Execute(filter);

                model.TotalPoints = filter.TotalPoints;

                TempData["showSignOut"] = model.MyProfile;

                return View(model);
            }
            else
            {
                return Redirect(string.Format("/Profile/{0}", currentUserId));
            }
        }