Shanthosh Siva

Shanthosh Siva

  • NA
  • 107
  • 14.6k

using observal coll delete a items in both collection

Mar 21 2019 12:57 AM
Using two observal collction i want to remove items from matching same id with two collection...
 
Collections: 
1. windows
2. windows size 
 
 My Code:
 
foreach (var heat in Settings.RoomViewModelCollection)
{
foreach (var room in heat.HeatTransmission)
{
if (room.Windows.Any(x => WindowSize.Any(y => y.WindowSizeId.Equals(x.WindowSizeId))))
{
heat.HeatTransmission.Remove(room);
break;
}
}
}
 

Answers (3)