public void deleteFAQ(FAQ faq, int q) { var filter = new BsonDocument("category", faq.Category); var update = Builders<BsonDocument>.Update .Set("questions", new BsonArray(faq.Questions)) .Set("answers", new BsonArray(faq.Answers)); FAQCollection.FindOneAndUpdateAsync(filter, update); }
public void deleteCategory(FAQ faq) { var filter = new BsonDocument("category", faq.Category); FAQCollection.DeleteOneAsync(filter); }