예제 #1
0
        public void Remove(string path)
        {
            var hash = Retrieve(path);

            if (!Storage.Exists(hash))
            {
                return;
            }

            Storage.Delete(hash);
            Context.DeleteOne(file => file.Hash == hash);
        }
예제 #2
0
 public void Delete(int id)
 {
     _collection.DeleteOne(id);
 }
예제 #3
0
 /// <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));
 }