public static NotificationLogData ToModel(this INotificationLog log, bool withDetails = false)
 {
     if(log == null)
     return null;
       var data = new NotificationLogData() {
     Type = log.Type, MediaType = log.MediaType,
     Recipients = log.Recipients, MainRecipient = log.MainRecipient,  MainRecipeintUserId = log.MainRecipientUserId,
     Status = log.Status.ToString(), Error = log.Error, Attachments = log.AttachmentList,
       };
       data.AssignCommon(log);
       return data;
 }
        public static NotificationLogData ToModel(this INotificationLog log, bool withDetails = false)
        {
            if (log == null)
            {
                return(null);
            }
            var data = new NotificationLogData()
            {
                Type       = log.Type, MediaType = log.MediaType,
                Recipients = log.Recipients, MainRecipient = log.MainRecipient, MainRecipeintUserId = log.MainRecipientUserId,
                Status     = log.Status.ToString(), Error = log.Error, Attachments = log.AttachmentList,
            };

            data.AssignCommon(log);
            return(data);
        }