Ejemplo n.º 1
0
 /// <summary>
 /// 获取数据列表
 /// </summary>
 /// <param name="predicate"></param>
 /// <returns></returns>
 public IEnumerable <EventProduct> GetList(Expression <Func <CTMS_EVENTPRODUCT, bool> > predicate = null)
 {
     using (EventProductDAL dal = new EventProductDAL())
     {
         return(dal.Get(predicate).Select(EntityToModel).ToList());
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// 获取分页数据
        /// </summary>
        /// <param name="page"></param>
        /// <param name="predicate"></param>
        /// <returns></returns>
        public IEnumerable <EventProduct> GetList(PageInfo page, Expression <Func <CTMS_EVENTPRODUCT, bool> > predicate = null)
        {
            using (EventProductDAL dal = new EventProductDAL())
            {
                var list = dal.Get(predicate);

                return(list.Paging(ref page).Select(EntityToModel).ToList());
            }
        }