예제 #1
0
 public void Save(ItemGenericDataEntity p_generic)
 {
     using(var session = NHibernateHelper.OpenSession())
     {
         using(var transaction = session.BeginTransaction())
         {
             session.Save(p_generic);
             transaction.Commit();
         }
     }
 }
 public void saveGeneric()
 {
     ItemGenericDataEntity entity = new ItemGenericDataEntity();
     entity.GenericName = "Ibuprofen";
     new ItemGenericDao().Save(entity);
 }