public Drop ( string databaseName ) : AResult |
||
databaseName | string | |
Résultat | AResult |
public void Should_delete_database() { Database.CleanupTestDatabases(); var db = new ADatabase(Database.SystemAlias); var createResult = db.Create(Database.TestDatabaseGeneral); var deleteResult = db.Drop(Database.TestDatabaseGeneral); Assert.AreEqual(200, deleteResult.StatusCode); Assert.IsTrue(deleteResult.Success); Assert.IsTrue(deleteResult.HasValue); Assert.IsTrue(deleteResult.Value); }
public static void DeleteTestDatabase(string databaseName) { var db = new ADatabase(Database.SystemAlias); var resultList = db.GetAccessibleDatabases(); if (resultList.Success && resultList.Value.Contains(databaseName)) { db.Drop(databaseName); } }