MarcelloDB
MarcelloDB copied to clipboard
We should be able to clear all MarcelloDB storage
We need to be able to wipe out the entire MarcelloDB storage content to be able to fresh start without having to uninstall / reinstall the application.
Since the Session object take a rootPath, I think the "Wipeout" method should be exposed on the Session object.
+1 Currenly I need to loop through whole collection, retrieve entities ID's, and then call Destroy, one by one.
@bed007 Thank you for reporting this issue. You are right, MarcelloDB currently has no way of destroying all data at once.
However, there is a really simple way to do this. MarcelloDB stores files in the folder which was used to open the session. Every collectionFile is a file in that folder, and the filename is the name used to create the collection file.
So the simplest way to delete all the data (or specific collection files) is to Dispose the session and delete the files from the folder.
To be be implemented at the CollectionFile level.
session["my_data"].ClearAllCollections();
Any news on this? :-)