public ActionResult Index() { var allActiveTest = _examinationRepository.GetExaminations.Where(x => x.Active).OrderByDescending(x => x.CreationDate).ToList(); if (Request.IsAuthenticated && allActiveTest.Any()) { var me = _examinationRepository.GetProfile(User.Identity.Name); allActiveTest = allActiveTest.Where(x => x.Members.Contains(me.Member)).ToList(); return(View(allActiveTest)); } return(View(allActiveTest)); }