-
Notifications
You must be signed in to change notification settings - Fork 1.3k
a.DbMain
zonecolour edited this page May 7, 2020
·
9 revisions
Some special operations on databases
var tables = db.DbMaintenance.GetTableInfoList();
foreach (var table in tables)
{
Console.WriteLine(table.Description);
}
name | description | return type |
---|---|---|
GetDataBaseList | Get all database | List |
GetViewInfoList | Get all views in the database | List |
GetTableInfoList | Get all tables in the database | List |
GetColumnInfosByTableName | Get columnInfos By tableName---- | List |
GetIsIdentities | Get identity columns | List |
GetPrimaries | Get Primary key columns | List |
IsAnyTable | Is any table | bool |
IsAnyColumn | Is any column | bool |
IsPrimaryKey | Is primary key | bool |
IsIdentity | Is identity | bool |
IsAnyConstraint | Is any constraint | bool |
DropTable | Drop table | bool |
TruncateTable | Truncate table | bool |
CreateTable | Create table | bool |
AddColumn | Add column | bool |
UpdateColumn | Update column | bool |
AddPrimaryKey | Add primary key | bool |
DropConstraint | Drop constraint | bool |
BackupDataBase | Backup dataBase | bool |
DropColumn | Drop column | bool |
RenameColumn | Rename column | bool |
AddTableRemark | Add table remark | bool |
AddColumnRemark | Add column remark | bool |
DeleteColumnRemark | delete column remark | bool |
DeleteColumnRemark | delete column remark | bool |
RenameTable | Rename table | bool |