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

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