public void SetUpTable() { this.engine = new Engine(); this.database = this.engine.CreateDatabase("Sales"); this.table = database.CreateTable("Employees"); this.table.AddColumn(new Column("FirstName")); this.table.AddColumn(new Column("LastName")); this.table.AddRow(new object[] { "John", "Smith" }); this.table.AddRow(new object[] { "Adam", "Jones" }); this.table.AddRow(new object[] { "Alice", "Stuart" }); }
public Database CreateDatabase(string name) { if (this.databases.ContainsKey(name)) throw new InvalidOperationException(string.Format("Database {0} already exists", name)); Database db = new Database(this, name); this.databases[name] = db; return db; }
internal Schema(Database database, string name) { this.name = name; this.database = database; }
public void Setup() { this.engine = new Engine(); this.database = this.engine.CreateDatabase("foo"); }