예제 #1
0
 /// <summary>
 /// 获取单条数据
 /// </summary>
 /// <returns></returns>
 public V_ctms_hr_post Get(Expression <Func <ctms_hr_post, bool> > predicate = null)
 {
     using (ctms_hr_postDAL dal = new ctms_hr_postDAL()){
         ctms_hr_post entity = dal.Get(predicate);
         return(EntityToModel(entity));
     }
 }
예제 #2
0
        /// <summary>
        /// 获取分页数据
        /// </summary>
        /// <param name="page"></param>
        /// <returns></returns>
        public IEnumerable <V_ctms_hr_post> GetList(PageInfo page)
        {
            using (ctms_hr_postDAL dal = new ctms_hr_postDAL()){
                var list = dal.Get();

                return(list.Paging(ref page).Select(EntityToModel).ToList());
            }
        }
예제 #3
0
 /// <summary>
 /// 获取列表
 /// </summary>
 /// <returns></returns>
 public IEnumerable <V_ctms_hr_post> Get()
 {
     using (ctms_hr_postDAL dal = new ctms_hr_postDAL()){
         List <ctms_hr_post>   entitys = dal.Get().ToList();
         List <V_ctms_hr_post> list    = new List <V_ctms_hr_post>();
         foreach (ctms_hr_post item in entitys)
         {
             list.Add(EntityToModel(item));
         }
         return(list);
     }
 }