Example #1
0
        public PageListResult <LiveChannelDto> GetLiveChannelPageList(LiveChannelSearchDto liveChannelSearchDto)
        {
            var result = _liveChannelRepository.GetAll().WhereIf(!liveChannelSearchDto.KeyWord.IsNullOrWhiteSpace(), m => (m.Name.Contains(liveChannelSearchDto.KeyWord) || m.FactoryName.Contains(liveChannelSearchDto.KeyWord)))
                         .OrderBy(liveChannelSearchDto.Orderby).PageBy <LiveChannel, LiveChannelDto>(liveChannelSearchDto);

            return(result);
        }
Example #2
0
        public List <LiveChannelDto> GetLiveChannels(LiveChannelSearchDto liveChannelSearchDto)
        {
            var result = _liveChannelRepository.GetAll().WhereIf(!liveChannelSearchDto.KeyWord.IsNullOrWhiteSpace(), m => (m.Name.Contains(liveChannelSearchDto.KeyWord) || m.FactoryName.Contains(liveChannelSearchDto.KeyWord)))
                         .ToList();
            var mapResult = result.MapTo <List <LiveChannelDto> >();

            return(mapResult);
        }