Пример #1
0
 public static void Delete(EY_Batch VO)
 {
     using (ISession session = SessionHelper.GetSession())
     {
         session.Delete(VO);
         session.Flush();
     }
 }
Пример #2
0
        /// <summary>
        /// 按主键查询一个
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public static EY_Batch LoadOne(object id)
        {
            EY_Batch ret = null;

            using (ISession session = SessionHelper.GetSession())
            {
                ret = session.Load <EY_Batch>(id);
            }
            return(ret);
        }