public void Remove(string path) { var hash = Retrieve(path); if (!Storage.Exists(hash)) { return; } Storage.Delete(hash); Context.DeleteOne(file => file.Hash == hash); }
public void Delete(int id) { _collection.DeleteOne(id); }
/// <summary> /// Deletes the specified book from the libary and updates the data file /// </summary> /// <param name="deleteId">ID of the deleted book</param> /// <returns>true if deleted successfully, false if not</returns> public bool DeleteBook(int deleteId) { return(collection.DeleteOne(deleteId)); }