public void ParseAndExecuteCreateTableCommand() { CreateTableCommand cmd = (CreateTableCommand)GetCommand("create table Customers(Name, Address)"); cmd.Execute(this.database); Table table = this.database.GetTable("Customers"); Assert.IsNotNull(table); Assert.AreEqual(2, table.ColumnCount); Assert.IsNotNull(table.GetColumn("Name")); Assert.IsNotNull(table.GetColumn("Address")); }
protected void CreateTable() { lock (this._globalLock) { using (this.Connection.OpenWrapper()) { CreateTableCommand command = new CreateTableCommand( this.Connection, this.TableDefinition ); command.Execute(100); } } }
public void ExecuteCreateTableCommand() { CreateTableCommand cmd = new CreateTableCommand("Customers"); cmd.AddColumn(new Column("Name")); cmd.AddColumn(new Column("Address")); cmd.Execute(this.database); Table table = this.database.GetTable("Customers"); Assert.IsNotNull(table); Assert.AreEqual(2, table.ColumnCount); Assert.IsNotNull(table.GetColumn("Name")); Assert.IsNotNull(table.GetColumn("Address")); }