public FeedEntryEntity(FeedEntryEntity entry) { CreatedDateTimeUTC = entry.CreatedDateTimeUTC; PublishedAt = entry.PublishedAt; PartitionKey = entry.PartitionKey; RowKey = entry.RowKey; Link = entry.Link; DocumentId = entry.DocumentId; Title = entry.Title; Description = entry.Description; }
public FeedEntryEntity Move(string feedName, string guid, string newFeedname) { Log.Information("Moving attachment {guid} from {feedName} to {newFeedname}", guid, feedName, newFeedname); var existingFeedEntry = _feedEntryQuery.GetFeedEntry(feedName, guid); _feedEntryRepository.Delete(existingFeedEntry); var newFeedEntry = new FeedEntryEntity(existingFeedEntry) { PartitionKey = newFeedname }; var savedFeedEntry = _feedEntryRepository.Insert(newFeedEntry); if (savedFeedEntry.GetEntryType() == FeedEntryType.Attachment) { _attachmentService.Move(feedName, savedFeedEntry.RowKey, newFeedname); } return savedFeedEntry; }
public static FeedEntryEntity CreateFromLink(string feed, string link, string title) { var feedEntryEntity = new FeedEntryEntity(feed, title); feedEntryEntity.Link = link; return feedEntryEntity; }
public static FeedEntryEntity CreateFromAttachment(string feed, string title) { var feedEntryEntity = new FeedEntryEntity(feed, title); return feedEntryEntity; }