public void InsertDocument()
        {
            Events.BeforeInsertDocument(this, OnBeforeInsert, _classType);

            EnsureUpRelations();

            Writer.Instance.Insert <T>(_classType.Name, _classType, (T)(object)this);

            Events.AfterInsertDocument(this, OnAfterInsert, OnAfterComplete, _classType);
        }