/// <summary> /// Links two nodes /// </summary> /// <typeparam name="T"></typeparam> /// <param name="collection"></param> /// <param name="parentId"></param> /// <param name="childId"></param> /// <returns></returns> public static async Task <bool> LinkParentChild <T>(this IMongoCollection <T> collection, string parentId, string childId) where T : NeuralLinkModel { return(await collection.AddChildLinkById(parentId, childId) && await collection.AddParentLinkById(childId, parentId)); }