Esempio n. 1
0
        public async Task <ActionResult> check_notifs()
        {
            var json = new StreamReader(Request.Body).ReadToEnd();
            var data = JsonConvert.DeserializeObject <NotificationEntity>(json);

            var check_unread_notifications = await NotificationBLL.Count(_context, data);

            var check_unread_messages = await MessageBLL.Count(_context, new MessageEntity()
            {
                isRead    = false,
                To        = data.RecipentID,
                loadReply = false
            });

            return(Ok(new { notifs = check_unread_notifications, message_notifs = check_unread_messages }));
        }