public bool Equals(EntityWithId other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; return other._id == _id; }
private static void ChangeStateOfEntity(ObjectStateManager objectStateManager, EntityWithId entity) { // TODO: Check for changs or deleted before moving this to Added/Modified objectStateManager.ChangeObjectState(entity, entity.Id == 0 ? EntityState.Added : EntityState.Modified); }