Ejemplo n.º 1
0
        /// <summary>
        /// Delete attachment with id
        /// </summary>
        /// <param name="attachmentId"></param>
        public void DeleteAttachmentById(int attachmentId)
        {
            AttachmentDomain attachmentDomain = _attachmentRepository.GetById(attachmentId);

            if (attachmentDomain == null)
            {
                throw new NsiArgumentException(NotificationMessages.AttachmentWithIdDoesNotExist);
            }

            _attachmentRepository.DeleteById(attachmentId);
        }
Ejemplo n.º 2
0
 public bool DeleteById(int id)
 {
     return(rep.DeleteById(id));
 }