Refactor foreach loops
An option would be to create two IEqualityComparers; one for DocumentType and one for DocumentTypeVersion. You could then easily call Intersect() and get the correct ones. 

public class DocumentTypeIdComparer : IEqualityComparer&lt;DocumentType&gt;
{
    public bool Equals(DocumentType docType1, DocumentType docType2)
    {
        return !(docType1 == null || docType2 == null) &amp;&amp; docType1.Id == docType2.Id;           
    }
}

public class DocumentTypeVersionComparer : IEqualityComparer&lt;DocumentTypeVersion&gt;
{
    public bool Equals(DocumentTypeVersion docTypeVersion1, DocumentTypeVersion docTypeVersion2)
    {
        return !(docTypeVersion1 == null || docTypeVersion2 == null) &amp;&amp; Object.Equals(docTypeVersion1, docTypeVersion2);           
    }
}


You will then be able to reduce your code to this;

var equalDocumentsById = documentTypes.Intersect(importDocumentTypes, new DocumentTypeIdComparer());
var equalVersions = documentTypes.Versions.Intersect(importDocumentTypes.Versions, new DocumentTypeVersionComparer());
var equalDocuments = equalDocumentsById.Where(doc =&gt; doc.Versions.Intersect(equalVersions, new DocumentTypeVersionComparer()).Any());


And then process equalDocuments as you please. If you want the documents which are not equal, simply switch .Count &gt; 0 with .Count == 0.