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); }
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); }