示例#1
0
        public IActionResult Index()
        {
            TempData.Clear();
            profiel = new Profiel
            {
                Account = new Account()
            };
            var identity = (ClaimsIdentity)HttpContext.User.Identity;

            profiel.Account.ID = Convert.ToInt32(identity.FindFirst(ClaimTypes.NameIdentifier).Value);
            tijdlijn           = new Tijdlijn(profiel);

            pRepo.ProfielOphalen(profiel);
            tijdlijn.Twoots   = tRepo.TwootsOphalen(tijdlijn);
            tijdlijn.Vrienden = tRepo.VriendenOphalen(tijdlijn);
            Response.Cookies.Append("ProfielID", profiel.ID.ToString());

            GetTijdlijn get = new GetTijdlijn(tijdlijn);

            return(View(get));
        }
示例#2
0
        public IActionResult Bezoek(string id)
        {
            if (id != null)
            {
                profiel = new Profiel
                {
                    Account = new Account(),
                    ID      = Convert.ToInt32(id)
                };

                profiel           = pRepo.ProfielOphalen(profiel.ID);
                tijdlijn          = new Tijdlijn(profiel);
                tijdlijn.Twoots   = tRepo.TwootsOphalen(tijdlijn);
                tijdlijn.Vrienden = tRepo.VriendenOphalen(tijdlijn);
                bool volgend = CheckVolgend(Convert.ToInt32(id));

                GetTijdlijn get = new GetTijdlijn(tijdlijn, volgend);

                return(View(get));
            }
            return(View());
        }