I\'ve been trying and failing for a while to find a solution to compare to lists of objects based on a property of the objects. I\'ve read other similar solutions but they w
Simple Linq
New
List toBeAdded = compareList.Where(c=>c.Id==0).ToList();
To be deleted
List toBeDeleted = masterList.Where(c => !compareList.Any(d => c.Id == d.Id)).ToList();
To be updated
List toBeUpdated = masterList.Where(c => compareList.Any(d => c.Id == d.Id)).ToList();