public static AnnouncementAttachmentViewData Create(AnnouncementAttachmentInfo announcementAttachmentInfo, bool isOwner)
 {
     return(new AnnouncementAttachmentViewData
     {
         AttachedDate = announcementAttachmentInfo.AnnouncementAttachment.AttachedDate,
         Id = announcementAttachmentInfo.AnnouncementAttachment.Id,
         Order = announcementAttachmentInfo.AnnouncementAttachment.Order,
         Attachment = AttachmentViewData.Create(announcementAttachmentInfo.AttachmentInfo, isOwner),
         AnnouncementId = announcementAttachmentInfo.AnnouncementAttachment.AnnouncementRef
     });
 }
 public static AnnouncementCommentViewData Create(AnnouncementComment announcementComment, IList <AttachmentInfo> attachments, int currentPersonId)
 {
     return(new AnnouncementCommentViewData
     {
         Id = announcementComment.Id,
         AnnouncementId = announcementComment.AnnouncementRef,
         Attachments = attachments?.Select(x => AttachmentViewData.Create(x, currentPersonId)).ToList(),
         ParentCommentId = announcementComment.ParentCommentRef,
         Owner = ShortPersonViewData.Create(announcementComment.Person),
         TimePosted = announcementComment.PostedDate,
         Text = announcementComment.Text,
         Hidden = announcementComment.Hidden,
         Deleted = announcementComment.Deleted
     });
 }