Example #1
0
        public void SetNotificationAsRead(UserIdentity user, int notificationId)
        {
            var notification = NotificationBiz.ReadSingle(n => n.Id == notificationId);

            if (notification.ReceiverId != user.UserId)
            {
                throw new BusinessException();
            }
            notification.IsRead = true;
            UnitOfWork.SaveChanges();
        }