Deleting

To delete parts form the storage, query the structure to be deleted uniquely and call the Delete method.

To delete the film Inception from the graph:

Define the structure to be deleted. Query it. Optionally check that the Status is QueriedUniqueHit. We know it is here though. Finally execute the Delete command.

var filmToDelete = new Part("Film").Add(new Part("Title").Add(new Simple<string>("Inception"))); 

nest.Query(filmToDelete);

nest.Delete(filmToDelete);


This is what remains after the delete:

Note that the loose ends Year and Director are removed as well - although not specifically defined in the Delete structure.