public async Task <bool> DeleteAllQuestions() { List <string> all_topics = await GetAllTopics(); DeleteResult deleteResult = await context.QuestionGenerationCollection.DeleteManyAsync(_ => true); if (deleteResult.IsAcknowledged && deleteResult.DeletedCount > 0) { Console.WriteLine(deleteResult.DeletedCount + " Items Deleted."); TopicBroadcaster topicBroadcaster_all_deleted = new TopicBroadcaster(); topicBroadcaster_all_deleted.Publish_All_Topics_as_deleted(all_topics); Console.WriteLine("All the topics are deleted --------------"); return(true); } return(false); }