public ActionResult Index() { var user = userHelper.getUser(User.Identity.GetUserId()); if (roleHelper.ListUserRoles(user.Id).FirstOrDefault() == "Default") { return(RedirectToAction("Index", "Manage")); } var model = new HomeVM(); model.UserId = user.Id; model.User = user; model.TicketsCount = ticketHelper.GetMyTickets().ToList().Count; model.TotalNotificationsCount = notificationHelper.NotificationCount(); model.UsersCount = projectHelper.GetUsersOnMyProjects().Count; List <int> ProjectIds = new List <int>(); foreach (var project in projectHelper.GetUserProjects()) { ProjectIds.Add(project.Id); } model.ProjectIds = ProjectIds; return(View(model)); }