public AscmMesInteractiveLog Get(int id) { AscmMesInteractiveLog ascmMesInteractiveLog = null; try { ascmMesInteractiveLog = YnDaoHelper.GetInstance().nHibernateHelper.Get <AscmMesInteractiveLog>(id); } catch (Exception ex) { YnBaseClass2.Helper.LogHelper.GetLog().Error("查询失败(Get AscmMesInteractiveLog)", ex); throw ex; } return(ascmMesInteractiveLog); }
public void Save(AscmMesInteractiveLog ascmMesInteractiveLog) { try { using (ITransaction tx = YnDaoHelper.GetInstance().nHibernateHelper.GetCurrentSession().BeginTransaction()) { try { YnDaoHelper.GetInstance().nHibernateHelper.Save(ascmMesInteractiveLog); tx.Commit();//正确执行提交 } catch (Exception ex) { tx.Rollback();//回滚 throw ex; } } } catch (Exception ex) { YnBaseClass2.Helper.LogHelper.GetLog().Error("保存失败(Save AscmMesInteractiveLog)", ex); throw ex; } }