public JsonResult _GetNotifications() { var latestNotificationEntities = NotificationServices.GetNotificationsByRecipient(CurrentCedUser.CurrentUser.Email, 5); var latestNotificationsModel = _inAppNotificationHelper.GetNotificationViewModelItems(latestNotificationEntities); var unreadNotifCount = NotificationServices.GetNotificationCount(CurrentCedUser.CurrentUser.Email, false); var model = new LatestNotificationsModel { Notifications = latestNotificationsModel, Count = unreadNotifCount }; var viewString = ViewEngineResultFunc.Invoke(model); return(Json(new { data = viewString, count = unreadNotifCount })); }