コード例 #1
0
 public void saveCategory()
 {
     ItemCategoryDataEntity entity = new ItemCategoryDataEntity();
     entity.CategoryName = "Medicine";
     ItemCategoryDao dao = new ItemCategoryDao();
     dao.Save(entity);
 }
コード例 #2
0
 public void Save(ItemCategoryDataEntity p_category)
 {
     using(var session = NHibernateHelper.OpenSession())
     {
         using(var transaction = session.BeginTransaction())
         {
             session.Save(p_category);
             transaction.Commit();
         }
     }
 }