Exemplo n.º 1
0
        public void AddColumn()
        {
            var Database = new Utilities.ORM.Manager.Schema.Default.Database.Database("TestDatabase");

            Utilities.ORM.Manager.Schema.Interfaces.ITable View = Database.AddView("TestView");
            View.AddColumn <int>("Column1", DbType.Int32, 0, true);
            Assert.Equal(1, View.Columns.Count);
        }
        public void AddColumn()
        {
            var Database = new Utilities.ORM.Manager.Schema.Default.Database.Database("TestDatabase");

            Utilities.ORM.Manager.Schema.Interfaces.ITable Function = Database.AddStoredProcedure("TestStoredProcedure", "Definition");
            Function.AddColumn <int>("Column1", DbType.Int32, 0);
            Assert.Equal(1, Function.Columns.Count);
        }
Exemplo n.º 3
0
        public void AddColumns()
        {
            var Database = new Utilities.ORM.Manager.Schema.Default.Database.Database("TestDatabase");

            Utilities.ORM.Manager.Schema.Interfaces.ITable  Table  = Database.AddTable("TestTable");
            Utilities.ORM.Manager.Schema.Interfaces.IColumn Column = Table.AddColumn <int>("Column1", DbType.Int32);
            Assert.Equal(Column, Table.Columns.First());
            Assert.Equal("Column1", Column.Name);
            Assert.Equal(DbType.Int32, Column.DataType);
            Assert.Equal("", Column.Default);
        }