Greetings I've got a logic question I have got 2 procedures
First is linq that looks like:
_sharedDocumentsAttachments = SourceDocumentAttachmentMeta
.Where(sDoc => TargetDocumentAttachmentMeta.Any(tDoc => tDoc.DocumentBridgeId == sDoc.DocumentId)).ToList();
Where
List<DocumentAttachment> _sharedDocumentsAttachments;
And
SharedDocumnentAttachmentConnector = new Dictionary<int, int>();
foreach (DocumentAttachment document in _sharedDocumentsAttachments)
{
foreach (DocumentAttachment tDoc in TargetDocumentAttachmentMeta.Where(tDoc => document.DocumentId == tDoc.DocumentBridgeId))
{
SharedDocumnentAttachmentConnector.Add(document.DocumentId, tDoc.DocumentId);
}
}
And I was wondering if I can attach second procedure to the first one somehow, as basically the are doing same compare but adding values to 2 different collections?
I was experimenting with for each but it wont work correctly.