/// <summary>Drop table (Table MUST exists).</summary> /// <param name="modelDef">The model definition.</param> private async Task DropTableAsync(ModelDefinition modelDef) { var dropTableFks = DialectProvider.GetDropForeignKeyConstraints(modelDef); if (!string.IsNullOrEmpty(dropTableFks)) { await this.ExecuteAsync(dropTableFks); } await this.ExecuteAsync(DialectProvider.GetDropTableStatement(modelDef)); }
/// <summary>Drop table (Table MUST exists).</summary> /// <param name="modelDef">The model definition.</param> private void DropTable(ModelDefinition modelDef) { var dialectProvider = DialectProvider; var tableName = dialectProvider.NamingStrategy.GetTableName(modelDef.ModelName); var dropTableFks = DialectProvider.GetDropForeignKeyConstraints(modelDef); if (!string.IsNullOrEmpty(dropTableFks)) { this.Execute(dropTableFks); } this.Execute(DialectProvider.GetDropTableStatement(modelDef)); }