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

                return(list.Paging(ref page).Select(EntityToModel).ToList());
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// 获取列表
 /// </summary>
 /// <returns></returns>
 public IEnumerable <V_xy_sp_taskoption> Get()
 {
     using (xy_sp_taskoptionDAL dal = new xy_sp_taskoptionDAL()){
         List <xy_sp_taskoption>   entitys = dal.Get().ToList();
         List <V_xy_sp_taskoption> list    = new List <V_xy_sp_taskoption>();
         foreach (xy_sp_taskoption item in entitys)
         {
             list.Add(EntityToModel(item));
         }
         return(list);
     }
 }