public void DeleteRelationship(string id) { Check.Id(id); CheckIsReadOnly(); Relationships.Remove(id); relationshipsCollection.Relationships.RemoveAll(r => r.Id == id); if (Relationships.Count > 0) { using (Stream s = GetPart(RelationshipUri).GetStream()) WriteRelationships(relationships, s); } else { DeletePart(RelationshipUri); } }