Exemplo n.º 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);
        }
Exemplo n.º 2
0
 public void Delete(int id)
 {
     _collection.DeleteOne(id);
 }
Exemplo n.º 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));
 }