public async Task <IActionResult> UnsubscribeRequest(string eModel, string accept) { if ((accept ?? "No") == "Yes") { NotificationUnsubscribe model = ModelEncryptor.Decrypt <NotificationUnsubscribe>(eModel); var userGroups = await _notificationManager.GetUserGroupsAssignedToNotificationAndUserAsync(model.NotificationId, model.UserId); foreach (var userGroup in userGroups) { await _userGroupManager.UnsubscribeFromNotificationGroupAsync(userGroup.Id, model.UserId); } return(this.MasterPageView("/UI/Views/Public/NotifyMeSignUp/UnsubscribeSuccess.cshtml", model, "Unsubsrcribe")); } else { return(LocalRedirect("/")); } }