Пример #1
0
 /// <summary>
 /// 获取单条数据
 /// </summary>
 /// <returns></returns>
 public V_xy_sp_userspiritpackage Get(Expression <Func <xy_sp_userspiritpackage, bool> > predicate = null)
 {
     using (xy_sp_userspiritpackageDAL dal = new xy_sp_userspiritpackageDAL()){
         xy_sp_userspiritpackage entity = dal.Get(predicate);
         return(EntityToModel(entity));
     }
 }
Пример #2
0
        /// <summary>
        /// 获取分页数据
        /// </summary>
        /// <param name="page"></param>
        /// <returns></returns>
        public IEnumerable <V_xy_sp_userspiritpackage> GetList(PageInfo page)
        {
            using (xy_sp_userspiritpackageDAL dal = new xy_sp_userspiritpackageDAL()){
                var list = dal.Get();

                return(list.Paging(ref page).Select(EntityToModel).ToList());
            }
        }
Пример #3
0
        /// <summary>
        /// 获取分页数据
        /// </summary>
        /// <param name="page"></param>
        /// <returns></returns>
        public List <V_xy_sp_userspiritpackage> GetSpPackageListBySpID(string SpID)
        {
            using (xy_sp_userspiritpackageDAL dal = new xy_sp_userspiritpackageDAL())
            {
                var list = from ent in dal.Get()
                           where ent.UserSpiritID == SpID
                           select ent;

                return(list.Select(EntityToModel).ToList());
            }
        }
Пример #4
0
 /// <summary>
 /// 获取列表
 /// </summary>
 /// <returns></returns>
 public IEnumerable <V_xy_sp_userspiritpackage> Get()
 {
     using (xy_sp_userspiritpackageDAL dal = new xy_sp_userspiritpackageDAL()){
         List <xy_sp_userspiritpackage>   entitys = dal.Get().ToList();
         List <V_xy_sp_userspiritpackage> list    = new List <V_xy_sp_userspiritpackage>();
         foreach (xy_sp_userspiritpackage item in entitys)
         {
             list.Add(EntityToModel(item));
         }
         return(list);
     }
 }