public virtual ActionResult GetNotNotifiedNotifications() { var userId = _intranetUserService.GetCurrentUserId(); var notNotifiedNotifications = _uiNotifierService.GetNotNotifiedNotifications(userId); var model = new JsonNotificationsModel() { Count = notNotifiedNotifications.Count(), Notifications = notNotifiedNotifications.Select(MapNotificationToJsonModel), }; return(new JsonNetResult() { Data = model, SerializerSettings = new JsonSerializerSettings() { ContractResolver = new CamelCasePropertyNamesContractResolver() } }); }
public virtual ActionResult GetNotNotifiedNotifications() { var currentMember = _intranetMemberService.GetCurrentMember(); var notNotifiedNotifications = currentMember != null ? _uiNotifierService.GetNotNotifiedNotifications(currentMember.Id) : new List <Notification>(); var model = new JsonNotificationsModel { Count = notNotifiedNotifications.Count, Notifications = notNotifiedNotifications.Select(MapNotificationToJsonModel) }; return(new JsonNetResult { Data = model, SerializerSettings = new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver() } }); }