예제 #1
0
        public async Task <List <AddressRegionDTO> > FilterAddressRegionAsync(AddressRegionFilterModel addressRegionFilter)
        {
            List <AddressRegionDTO> list = await this.GetAllAddressRegionsAsync();

            if (addressRegionFilter.AddressRegionID != null)
            {
                list = list.Where(emp => emp.AddressRegionID == addressRegionFilter.AddressRegionID).ToList();
            }
            if (addressRegionFilter.AddressRegionName != null)
            {
                list = list.Where(emp => emp.AddressRegionID == addressRegionFilter.AddressRegionID).ToList();
            }
            return(list);
        }
 public async Task <List <AddressRegionDTO> > FilterRegion(AddressRegionFilterModel RegionDto)
 {
     return(await addressRegionService.FilterAddressRegionAsync(RegionDto));
 }