What would be the best approach to remove a value from a list where the property Id is contained in another list.
I tried this but is not quote working the way as expected.
internal static List<DashboardData> CloseWhereOpen(List<DashboardData> rawData,
List<DashboardData> activitiesOpen)
{
var index = 0;
foreach (var val in rawData)
{
if (activitiesOpen.Select(ao=>ao.CanvasId == val.CanvasId).Count() > 0) {
rawData.ToList().RemoveAt(index);
}
index++;
}
return rawData;
}