May be my problem is common. I have seen it here Comparing Two collections. But I want to compare two complex collections.
public class Project
{
public Int32 ProjectID { get; set; }
public String ProjectName { get; set; }
public String ProjectCode { get; set; }
}
public class Unit
{
public Int32 UnitID { get; set; }
public Int32 ProjectID { get; set; }
public String UnitName { get; set; }
public String UnitCode { get; set; }
}
Here Project and Unit have a Common field called ProjectID
.And I have a Collection of Project and Unit. Corresponding to each project in the project collection, there is a unit in the unit collection. And some of the units in the unit collection is not belonging to any project in the project collection. I want to Filter out those units. How can I do that using Linq.