Compare two lists of object for new, changed, updated on a specific property

Simple Linq

New

List<AccommodationImageModel> toBeAdded = compareList.Where(c=>c.Id==0).ToList();

To be deleted

List<AccomodationImageModel> toBeDeleted = masterList.Where(c => !compareList.Any(d => c.Id == d.Id)).ToList();

To be updated

List<AccomodationImageModel> toBeUpdated = masterList.Where(c => compareList.Any(d => c.Id == d.Id)).ToList();

Assuming that two models with the same Id are considered the same model, you can write a IEqualityComparer like this:

public class AccommodationImageModelComparer : IEqualityComparer<AccommodationImageModel>
{
    public bool Equals(AccommodationImageModel x, AccommodationImageModel y)
    {
        if(x == null && y == null)
           return true;

        return x.Id == y.Id;
    }

    public int GetHashCode(AccommodationImageModel model)
    {
        return model.Id.GetHashCode();
    }
}

You can then use Linq to get the lists that you want:

var comparer = new AccommodationImageModelComparer();

var newItems = compareList.Where (l => l.Id == 0).ToList();
var toBeDeleted = masterList.Except(compareList, comparer).ToList();
var toBeUpdated = masterList.Intersect(compareList, comparer).ToList();

The first one just filters the items with an Id of 0, which are conisdered new. The second query returns the items in the masterList which are not in the compareList. The last query returns the items which are in both lists. This code compiles but is untested.