Is there a way to disable concurrency error thrown in EntityFramework?
For example:
using (xEntities5 entities = new xEntities5()) { entities.Domains.MergeOption = System.Data.Objects.MergeOption.NoTracking; Domain domain = new Domain() { DomainId = id }; EntityKey key = entities.CreateEntityKey(entities.CreateObjectSet<Domain>().EntitySet.Name, domain); domain.EntityKey = key; entities.Attach(domain); //entities.AttachTo(entities.CreateObjectSet<Domain>().EntitySet.Name, domain); entities.DeleteObject(domain); return entities.SaveChanges(); // returns affected rows... must catch error? } Is there a way to not have to do try/catch around SaveChanges in order to detect if nothing was deleted?