Ejemplo n.º 1
0
 public void Save(kpis kpi)
 {
     using (ISession session = NHibernateHelper.OpenSession())
         using (ITransaction transaction = session.BeginTransaction())
         {
             session.Save(kpi);
             transaction.Commit();
         }
 }
Ejemplo n.º 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();
         }
 }