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

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