Exemplo n.º 1
0
        public Trigger Build(Trigger trigger)
        {
            if (table == null) table = new TableBuilder().Build();
            table.Triggers.Add(trigger);
            trigger.ParentObject = table;
            trigger.Schema = schema ?? new SchemaBuilder().Build();
            trigger.Type = SqlObjectType.SqlDmlTrigger;

            return trigger;
        }
Exemplo n.º 2
0
 public void FixtureSetUp()
 {
     using (var session = SessionFactory.OpenSession())
     {
         testedObject = session.CreateCriteria<Index>()
             .Add(Restrictions.Eq("Name", "PK_test_table"))
             .UniqueResult<Index>();
         expectedTable = session.CreateCriteria<Table>()
             .Add(Restrictions.Eq("Name", "test_table"))
             .UniqueResult<Table>();
     }
 }
Exemplo n.º 3
0
 public TriggerBuilder With(Table table)
 {
     this.table = table;
     return this;
 }
Exemplo n.º 4
0
 public void FixtureSetUp()
 {
     using (var session = SessionFactory.OpenSession())
     {
         expectedTable = session.CreateCriteria<Table>()
             .Add(Restrictions.Eq("Name", "test_table"))
             .UniqueResult<Table>();
         column = session.CreateCriteria<Column>()
             .Add(Restrictions.Eq("Name", "test"))
             .Add(Restrictions.Eq("ParentObject", expectedTable))
             .UniqueResult<Column>();
         expectedType = TypeMapTestBase.GetTypeByName("varchar", session);
     }
 }