Beispiel #1
0
        // GET: /<controller>/
        public IActionResult Index()
        {
            ViewBag.SiteSettings = sitesettings;

            List <SavedItem> saved = new List <SavedItem>();

            finalUser user = user_manager.FindByNameAsync(User.Identity.Name).Result;

            foreach (var item in note_repo.GetList())
            {
                if (item != null)
                {
                    if (item.UserID == user.UserHash)
                    {
                        saved.Add(item);
                    }
                }
            }
            foreach (var item in password_repo.GetList())
            {
                if (item.UserID == user.UserHash)
                {
                    saved.Add(item);
                }
            }
            foreach (var item in website_repo.GetList())
            {
                if (item.UserID == user.UserHash)
                {
                    saved.Add(item);
                }
            }

            return(View(saved));
        }