ASP.NET MVC 3 Compare 2 Lists with Model Objects for duplicates
<p>I am building an ASP.NET MVC 3 application, where I have on list of custom objects according to this model:</p>

<pre><code>public class AbnAmroTransaction
{
    public int TransactionId { get; set; }
    public int AccountNumber { get; set; }
    public string Currency { get; set; }
    public int TransactionDate { get; set; }
    public int InterestDate { get; set; }
    public decimal StartBalance { get; set; }
    public decimal EndBalance { get; set; }
    public decimal Amount { get; set; }
    public string Description { get; set; }
    public int CategoryId { get; set; }
}
</code></pre>

<p>I also have second list with slightly similar objects of custom object type "Transaction" (which I get from my SQL Server 2008 database using a DBML):</p>

<pre><code>Transaction LinqToSql Object

int TransactionId
int ImportId
int CategoryId
DateTime DateTime
Nvarchar(MAX) Currency
Money Amount
Nvarchar(MAX) Description
</code></pre>

<p>I'm trying to create a 3rd list that contains all AbnAmroTransactions, where the AbnAmroTransaction.TransactionId is not in the Transactions list (TransactionId). How do I do this without having to loop through both lists, which seems like a very unefficient way to do it?</p>

<p>I have found this article:
<a href="http://msdn.microsoft.com/en-us/library/system.collections.iequalitycomparer.equals.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/system.collections.iequalitycomparer.equals.aspx</a>
But that only seems to apply to objects of the same type.</p>
