public static int ObtenerNroNoNotificados() { CurrentUserViewModel user = (CurrentUserViewModel)HttpContext.Current.Session[ConfigurationManager.AppSettings["session.usuario.actual"]]; NotificationBL oNotificationBL = new NotificationBL(); return(oNotificationBL.ObtenerNroNoNotificados(user.user_id)); }
public IHttpActionResult Notifications(int user_id) { NotificationBL oNotificationBL = new NotificationBL(); var num_notificaciones_pendientes = oNotificationBL.ObtenerNroNoNotificados(user_id); var result = new { notifications = oNotificationBL.ObtenerPorUsuario(user_id) }; return(Ok(result)); }