Exemplo n.º 1
0
        public bool MarkUserNotificationAsUnSeen(string userId, int notificationId)
        {
            bool result = false;

            if (!string.IsNullOrEmpty(userId) && notificationId > 0)
            {
                UserNotification userNotification = _context.UserNotifications.DefaultIfEmpty(null).SingleOrDefault(un => un.UserId == userId && un.NotificationId == notificationId);

                if (userNotification != null)
                {
                    userNotification.MarkAsUnSeen();
                    result = true;
                }
            }

            return(result);
        }