public void Update(SChannels entity, List<ScsgLink> deletedLinks) { try { EntityState entityState = _siriusContext.GetEntityState(entity); if (entityState == EntityState.Detached) { _dbSet.Attach(entity); _siriusContext.SetModified(entity); foreach(ScsgLink link in deletedLinks) { _siriusContext.SetDeleted(link); } foreach(ScsgLink link in entity.ScsgLink.Where(s=>s.Added==true)) { _siriusContext.SetAdd(link); } } SaveChanges(); } //catch (DbEntityValidationException dbex) //{ // var msg = dbex.EntityValidationErrors.ToList(); //} catch (DbUpdateException ex) { ThrowError(ex); } }I had to add a new NotMapped Added property and a DeletedLinks to the ViewModel and make all necessary changes. So, this is not generic enough, but I'm not sure how to make the above more generic.