title: Compare two generic lists using Linq
body: <p>I'm trying to compare two generic list using following query, just want to insert modified values only</p>
  
  <p>so I wrote following </p>
  
  <pre><code>public ActionResult GetModifiedRecords(IEnumerable&lt;SalesOrder&gt; oldSalesOrderList, List&lt;SalesOrder&gt; newSalesOrderList)
  {
      var result = (from oldSalesOrder in oldSalesOrderList
                    from newSalesOrder in newSalesOrderList
                    where
                    (oldSalesOrder.Value != newSalesOrder.Value)
                    select oldSalesOrder).Distinct();
      IEnumerable&lt;SalesOrder&gt; modifiedSalesList = new List&lt;SalesOrder&gt;(result);
      return modifiedSalesOrder;           
  }
  </code></pre>
  
  <p>but this seems not working </p>