示例#1
0
        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());
        }
示例#2
0
 public void CreateDb(string dataBaseName)
 {
     DbServerProvider.ExcuteNonQuery(CommandType.Text, CreateDB.CreateDb(dataBaseName).ToSql().ToString());
 }