public ActionResult Add(NotificationsTB NotificationsTB) { try { if (!ModelState.IsValid) { return(View(NotificationsTB)); } _INotification.DisableExistingNotifications(); var Notifications = new NotificationsTB { CreatedOn = DateTime.Now, Message = NotificationsTB.Message, NotificationsID = 0, Status = "A", FromDate = NotificationsTB.FromDate, ToDate = NotificationsTB.ToDate }; _INotification.AddNotification(Notifications); MyNotificationHub.Send(); return(RedirectToAction("Add", "AddNotification")); } catch (Exception) { throw; } }