Пример #1
0
        /// <summary>
        /// 网站首页数据源
        /// </summary>
        /// <param name="query">查询条件</param>
        /// <returns></returns>
        public HomeUI Home(BookQuery query)
        {
            var list = book.GetList(query);

            HomeUI home = new HomeUI()
            {
                PublishHouseId = query.PublishHouseId,
                ParentType     = query.ParentType,
                SubType        = query.SubType,
                HoustList      = publishHouseRepository.GetList(),
                Parent         = bookTypeRepository.GetParentList(),
                Children       = query.ParentType > 0? bookTypeRepository.GetChildList(query.ParentType):null,
                QueryList      = list
            };

            return(home);
        }
Пример #2
0
 /// <summary>
 /// 获取所有记录
 /// </summary>
 /// <returns></returns>
 public List <PublishHouse> GetList()
 {
     return(service.GetList().ToList());
 }