コード例 #1
0
 public void Delete(Depart entity)
 {
     using (ISession session = sessionFactory.OpenSession())
     {
         session.Delete(entity);
         session.Flush();
     }
 }
コード例 #2
0
 public object Save(Depart entity)
 {
     using (ISession session = sessionFactory.OpenSession())
     {
         var id = session.Save(entity);
         session.Flush();
         return id;
     }
 }