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

                return(list.Paging(ref page).Select(EntityToModel).ToList());
            }
        }
Exemplo n.º 3
0
 /// <summary>
 /// 获取列表
 /// </summary>
 /// <returns></returns>
 public IEnumerable <V_xy_sp_userspirit> Get()
 {
     using (xy_sp_userspiritDAL dal = new xy_sp_userspiritDAL()){
         List <xy_sp_userspirit>   entitys = dal.Get().ToList();
         List <V_xy_sp_userspirit> list    = new List <V_xy_sp_userspirit>();
         foreach (xy_sp_userspirit item in entitys)
         {
             list.Add(EntityToModel(item));
         }
         return(list);
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// 获取列表
 /// </summary>
 /// <returns></returns>
 public List <V_xy_sp_userspirit> GetAllSpiritOfTask(string taskId)
 {
     using (xy_sp_userspiritDAL dal = new xy_sp_userspiritDAL()){
         List <xy_sp_userspirit> entitys = (from ent in dal.Get()
                                            where ent.CurrentTaskID == taskId
                                            select ent).ToList();
         List <V_xy_sp_userspirit> list = new List <V_xy_sp_userspirit>();
         foreach (xy_sp_userspirit item in entitys)
         {
             list.Add(EntityToModel(item));
         }
         return(list);
     }
 }