public string DeleteOrder(string orderId)
        {
            DbUtility db = new DbUtility();

            db.DeleteDocumentByObjectId("orders", orderId);

            string orders = db.GetAllDocumentsWithObjectId("orders");

            return(orders);
        }
        public string DeletePost(string postId)
        {
            DbUtility db = new DbUtility();

            //    db.DeleteDocumentByObjectId("students", ObjectId.Parse(customerId));
            db.DeleteDocumentByObjectId("blogPosts", postId);

            string posts = db.GetAllDocumentsWithObjectId("blogPosts");

            return(posts);
        }
        public string DeleteCustomer(string customerId)
        {
            DbUtility db = new DbUtility();

            //    db.DeleteDocumentByObjectId("students", ObjectId.Parse(customerId));
            db.DeleteDocumentByObjectId("customers", customerId);

            string customers = db.GetAllDocumentsWithObjectId("customers");

            return(customers);
        }
Beispiel #4
0
 public string deletePost(string id)
 {
     try
     {
         if (dbUtility.DeleteDocumentByObjectId("Posts", id))
         {
             return("Success");
         }
         else
         {
             return("Error");
         }
     }
     catch (Exception ex)
     {
         return("Error");
     }
 }
Beispiel #5
0
        public bool getTaskListforDelete(string taskId)
        {
            DbUtility dbUtil = new DbUtility();

            return(dbUtil.DeleteDocumentByObjectId("Task", taskId));
        }
Beispiel #6
0
        public bool deleteBook(string id)
        {
            DbUtility dbUtil = new DbUtility();

            return(dbUtil.DeleteDocumentByObjectId("Test", id));
        }