private void DropTables(IDbConnection cn, SqlServerSyntax syntax, Type[] modelClasses) { foreach (var tbl in modelClasses) { if (syntax.TableExists(cn, tbl)) { cn.Execute($"DELETE {syntax.GetTableName(tbl)}"); var obj = TableInfo.FromModelType(tbl, "dbo"); syntax.FindObjectId(cn, obj); var drop = new DropTable(syntax, obj); foreach (var cmd in drop.SqlCommands(cn)) { cn.Execute(cmd); } } } }