示例#1
0
 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" });
 }
示例#2
0
文件: Engine.cs 项目: ajlopez/AjBase
        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;
        }
示例#3
0
文件: Schema.cs 项目: ajlopez/AjBase
 internal Schema(Database database, string name)
 {
     this.name = name;
     this.database = database;
 }
示例#4
0
 public void Setup()
 {
     this.engine = new Engine();
     this.database = this.engine.CreateDatabase("foo");
 }