public void AddColumn() { var Database = new Utilities.ORM.Manager.Schema.Default.Database.Database("TestDatabase"); var Function = Database.AddStoredProcedure("TestStoredProcedure", "Definition"); Function.AddColumn<int>("Column1", DbType.Int32, 0); Assert.Equal(1, Function.Columns.Count); }
public void AddColumn() { var Database = new Utilities.ORM.Manager.Schema.Default.Database.Database("TestDatabase"); var Function = Database.AddStoredProcedure("TestStoredProcedure", "Definition"); Function.AddColumn <int>("Column1", DbType.Int32, 0); Assert.Equal(1, Function.Columns.Count); }
public void Create() { var Database = new Utilities.ORM.Manager.Schema.Default.Database.Database("TestDatabase"); var Function = Database.AddStoredProcedure("TestStoredProcedure", "Definition"); Assert.Equal(Function, Database.StoredProcedures.First()); Assert.Equal("TestStoredProcedure", Function.Name); Assert.Equal("Definition", ((Utilities.ORM.Manager.Schema.Interfaces.IFunction)Function).Definition); Assert.Equal(Database, Function.Source); }
public void AddStoredProcedures() { var Database = new Utilities.ORM.Manager.Schema.Default.Database.Database("TestDatabase"); Database.AddStoredProcedure("TestFunction", "FunctionDefinition"); Assert.Equal(1, Database.StoredProcedures.Count); Assert.Equal("TestFunction", Database.StoredProcedures.First().Name); Assert.Equal("FunctionDefinition", ((Utilities.ORM.Manager.Schema.Interfaces.IFunction)Database.StoredProcedures.First()).Definition); Assert.Equal(Database, Database.StoredProcedures.First().Source); }