public ActionResult UnreadIndex() { var userId = User.Identity.GetUserId(); var collectedNotifications = new CollectedNotifications { TicketNotifications = db.TicketNotifications.Where(t => t.UserId == userId && t.Unread).ToList(), ProjectNotifications = db.ProjectNotifications.Where(t => t.UserId == userId && t.Unread).ToList() }; return(View(collectedNotifications)); }
public ActionResult Index() { //var ticketNotifications = notificationHelper.ListUserNotifications(User.Identity.GetUserId()); var userId = User.Identity.GetUserId(); var collectedNotifications = new CollectedNotifications { TicketNotifications = db.TicketNotifications.Where(t => t.UserId == userId).ToList(), ProjectNotifications = db.ProjectNotifications.Where(t => t.UserId == userId).ToList() }; return(View(collectedNotifications)); }