public static AttachmentViewModel ToVM(this EmailAttachmentsDTO attachmentDTO)
        {
            var model = new AttachmentViewModel
            {
                Id       = attachmentDTO.Id,
                FileName = attachmentDTO.FileName,
                FileSize = attachmentDTO.FileSize,
                EmailId  = attachmentDTO.EmailId
            };

            return(model);
        }
Beispiel #2
0
        public static EmailAttachmentsDTO ToDTO(this EmailAttachments entity)
        {
            if (entity is null)
            {
                return(null);
            }

            var emailAttachment = new EmailAttachmentsDTO
            {
                Id       = entity.Id,
                EmailId  = entity.EmailId,
                FileName = entity.FileName,
                FileSize = entity.FileSize
            };

            return(emailAttachment);
        }