Skip to content
Mark Smith edited this page Mar 27, 2015 · 4 revisions

Now it's easier to do some generic db management.

var db= SqlFuDao.GetConnection();
var tools=db.DatabaseTools();

tools.TableExists("Name","dbo");

tools.RenameTable("OldName","NewName");

tools.DropTable("TableNamee");

tools.TruncateTable("TableName");

tools.TableHasColumn("Table","Column");

tools.TableHasPrimaryKey("Table");

tools.GetPrimaryKeyName("Table");

tools.GetCreateTableBuilder<T>().ExecuteDDL();
Clone this wiki locally