/// <summary> /// Add a node /// </summary> /// <typeparam name="T"></typeparam> /// <param name="node"></param> public void AddNode <T>(T node) where T : Node { // validate entity ValidateEntity(node); // Record history RecordHistory(node); // Get relevant collection var collection = GetCollection(node); collection.InsertOne(node); NewEntityAdded?.Invoke(this, node); }
public static void RaiseNewEntityAdded() { NewEntityAdded?.Invoke(); }