Say I have the following LINQ queries:
var source = from workflow in sourceWorkflowList
select new { SubID = workflow.SubID,
ReadTime = workflow.ReadTime,
ProcessID = workflow.ProcessID,
LineID = workflow.LineID };
var target = from workflow in targetWorkflowList
select new { SubID = workflow.SubID,
ReadTime = workflow.ReadTime,
ProcessID = workflow.ProcessID,
LineID = workflow.LineID };
var difference = source.Except(target);
sourceWorkflowList
and targetWorkflowList
have the exact same column definitions. But they both contain more columns of data than what is shown in the queries above. Those are just the columns needed for this particular issue.
difference
contains all rows in sourceWorkflowList
that are not contained in targetWorkflowList
Now what I would like to do is to remove all rows from sourceWorkflowList
that do not exist in difference
. Could someone show me a query that would do this?
Thanks very much - Randy