Exemplo n.º 1
0
 private int GetParentId(IParent parent)
 {
     if (parent is BusinessBase)
     {
         Object retval = parent.GetType().GetProperty("Id").GetValue(parent);
         return (int) retval;
     }
     return GetParentId(parent.Parent);
 }
Exemplo n.º 2
0
 protected override void OnTearDown()
 {
     using (var s = Sfi.OpenSession())
     {
         using (var tx = s.BeginTransaction())
         {
             s.Delete("from " + storedParent.GetType());
             tx.Commit();
         }
     }
 }