private void InserirCompra(Compra cp, IList <ProdutoCompra> lpc, IList <Boleto> lb) { try { UnitOfWorkNHibernate.GetInstancia().IniciarTransacao(); _compraService.Insert(cp, lpc, lb); UnitOfWorkNHibernate.GetInstancia().ConfirmarTransacao(); } catch (ExceptionMessage em) { UnitOfWorkNHibernate.GetInstancia().DesfazerTransacao(); throw em; } catch (Exception ex) { UnitOfWorkNHibernate.GetInstancia().DesfazerTransacao(); throw new StatusException("Erro interno . Favor informe ao administrador."); } }