public void CreateTable(RelationModel relation) { var a = SQL.CreateTable.CreateTb(relation.TbName); foreach (var c in relation.Columns) { a.AddColumn(c.ColumnName, c.TypeName, c.Size, c.ConstraintsStr); } SqlScript sql = a.ToSql(); DbServerProvider.ExcuteNonQuery(CommandType.Text, sql.ToString()); }
public void CreateDb(string dataBaseName) { DbServerProvider.ExcuteNonQuery(CommandType.Text, CreateDB.CreateDb(dataBaseName).ToSql().ToString()); }