Ejemplo n.º 1
0
 public void DeleteOne(AccessGroupDTO acc)
 {
     try
     {
         using (ISession session = NHibernateHelper.OpenSession())
         using (ITransaction transaction = session.BeginTransaction())
         {
             session.Delete(acc);
             transaction.Commit();
         }
         //return StorageResult.Success;
     }
     catch (Exception)
     {
         //return StorageResult.Failed;
     }
 }
Ejemplo n.º 2
0
 public void SaveOne(AccessGroupDTO acc)
 {
     try
     {
         //if(NameAllreadyInUse(acc.Name))
         //{
         //    return StorageResult.AllreadyExsists;
         //}
         using (ISession session = NHibernateHelper.OpenSession())
         using (ITransaction transaction = session.BeginTransaction())
         {
             session.Save(acc);
             transaction.Commit();
         }
         //return StorageResult.Success;
     }
     catch (Exception)
     {
         //return StorageResult.Failed;
     }
 }