public ActionResult NotificationSettings()
        {
            var vm = new UserEmailNotificationSettingsVM {
                TeamID = TeamID
            };
            var userSubscriptions = repo.GetUser(UserID).UserNotificationSubscriptions.ToList();

            var notificationTypes = repo.GetNotificationTypes().ToList();

            foreach (var item in notificationTypes)
            {
                var emailSubscription = new EmailSubscriptionVM {
                    NotificationTypeID = item.ID, Name = item.Name
                };
                emailSubscription.IsSelected = userSubscriptions.Any(s => s.UserID == UserID && s.TeamID == TeamID && s.NotificationTypeID == item.ID && s.Subscribed == true);
                vm.EmailSubscriptions.Add(emailSubscription);
            }

            return(View(vm));
        }
        public ActionResult NotificationSettings()
        {
            var vm = new UserEmailNotificationSettingsVM { TeamID = TeamID };
            var userSubscriptions = repo.GetUser(UserID).UserNotificationSubscriptions.ToList();

            var notificationTypes = repo.GetNotificationTypes().ToList();
            foreach (var item in notificationTypes)
            {
                var emailSubscription = new EmailSubscriptionVM { NotificationTypeID = item.ID, Name = item.Name };
                emailSubscription.IsSelected = userSubscriptions.Any(s => s.UserID == UserID && s.TeamID == TeamID && s.NotificationTypeID == item.ID && s.Subscribed == true);
                vm.EmailSubscriptions.Add(emailSubscription);
            }

            return View(vm);
        }