protected override void OnInsert(Entity entity) { if (entity is IUpdatableEntity) { ((IUpdatableEntity)entity).Id = _store.GetNextId(); } FixeUpReferences(entity); }