Script() public method

Translates this table into a SQL script
public Script ( ) : string
return string
示例#1
0
 public void Create_Script()
 {
     var c = new Column("testing", ColumnTypes.Bigint, true);
     var cc = new Constraint("ix_testing", ContraintType.Index, "testing");
     var test = new Table("test");
     test.Constraints.Add(cc);
     test.Columns.Add(c);
     //set the table reference
     foreach (var ccc in test.Constraints)
     {
         ccc.Table = test.Info;
     }
     Assert.Contains("test", test.Script());
 }