예제 #1
0
 public void Save(kpis kpi)
 {
     using (ISession session = NHibernateHelper.OpenSession())
         using (ITransaction transaction = session.BeginTransaction())
         {
             session.Save(kpi);
             transaction.Commit();
         }
 }
예제 #2
0
 public void Delete(kpis kpi)
 {
     using (ISession session = NHibernateHelper.OpenSession())
         using (ITransaction transaction = session.BeginTransaction())
         {
             session.CreateQuery("delete from kpis u where u.Id = (:id)")
             .SetParameter("id", kpi.Id)
             .ExecuteUpdate();
             transaction.Commit();
         }
 }