本文整理汇总了C#中MongoDatabase.Drop方法的典型用法代码示例。如果您正苦于以下问题:C# MongoDatabase.Drop方法的具体用法?C# MongoDatabase.Drop怎么用?C# MongoDatabase.Drop使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MongoDatabase
的用法示例。
在下文中一共展示了MongoDatabase.Drop方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Setup
public void Setup()
{
_server = Configuration.TestServer;
_server.Connect();
_database = Configuration.TestDatabase;
_database.Drop();
}
示例2: Setup
public void Setup()
{
_server = Configuration.TestServer;
_primary = Configuration.TestServer.Primary;
_database = Configuration.TestDatabase;
_database.Drop();
}
示例3: CreateLaptopFactoryDatabase
private static void CreateLaptopFactoryDatabase(MongoDatabase db)
{
db.Drop();
CreateMakersTable(db);
CreateModelsTable(db);
CreateLaptopsTable(db);
}
示例4: CreatePersister
public IStoreSagaData CreatePersister()
{
db = MongoHelper.GetDatabase(ConnectionStrings.MongoDb);
db.Drop();
return new MongoDbSagaPersister(ConnectionStrings.MongoDb)
.AllowAutomaticSagaCollectionNames();
}
示例5: MyTestInitialize
public void MyTestInitialize()
{
m_Testdb = new MongoDBForTest().DB;
m_Testdb.Drop();
m_mocked = new Mock<IServicesLayer>();
m_MocServiceLayer = m_mocked.Object;
m_mockedBackOffice = new Mock<IBackofficeService>();
m_MocBackOfficeService = m_mockedBackOffice.Object;
m_imageService = new ImageServices();
}
示例6: SetUp
public void SetUp()
{
var url = new MongoUrl(DB_URL);
testDB = new MongoClient(url).GetServer().GetDatabase(url.DatabaseName);
testDB.Drop();
var sampleRaw = BsonDocument.Parse(GetSampleRawAct());
SAMPLE_RAW_USER = sampleRaw["UserID"].AsString.ToLowerInvariant();
SAMPLE_RAW_LESSON = sampleRaw["LessonID"].AsString.ToLowerInvariant();
Assert.IsFalse(String.IsNullOrWhiteSpace(SAMPLE_RAW_USER));
Assert.IsFalse(String.IsNullOrWhiteSpace(SAMPLE_RAW_LESSON));
}
示例7: MyTestInitialize
public void MyTestInitialize()
{
m_Testdb = new MongoDBForTest().DB;
m_Testdb.Drop();
}
示例8: ClearDatabase
public static void ClearDatabase(MongoDatabase db)
{
db.Drop();
}
示例9: MyTestInitialize
public void MyTestInitialize()
{
m_Testdb = new TestDB().DB;
m_Testdb.Drop();
}