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

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