Example #1
0
 public int deletePatrimBem(PatrimBemDTO patrimBem)
 {
     try
     {
         int resultado = -1;
         using (ISession session = NHibernateHelper.getSessionFactory().OpenSession())
         {
             PatrimonioBemDAL DAL = new PatrimonioBemDAL(session);
             DAL.delete(patrimBem);
             session.Flush();
             resultado = 0;
         }
         return(resultado);
     }
     catch (Exception ex)
     {
         throw new FaultException(ex.Message + (ex.InnerException != null ? " " + ex.InnerException.Message : ""));
     }
 }