public PatrimBemDTO salvarAtualizarPatrimBem(PatrimBemDTO patrimBem) { try { using (ISession session = NHibernateHelper.getSessionFactory().OpenSession()) { PatrimonioBemDAL DAL = new PatrimonioBemDAL(session); DAL.saveOrUpdate(patrimBem); session.Flush(); } return(patrimBem); } catch (Exception ex) { throw new FaultException(ex.Message + (ex.InnerException != null ? " " + ex.InnerException.Message : "")); } }