public async Task <PageDataContainer <TownDto> > GetPagedTowns(string filter, PageArguments pageArguments) { filter = filter?.ToLower() ?? string.Empty; PageDataContainer <TownDto> pagedTowns = await _townRepository.GetPagedTows(filter, pageArguments); if (pagedTowns.PageData.Count == 0) { return(null); } return(pagedTowns); }