public Entity.SearchResult <List <Entity.DeviceTypeDetail> > List(Entity.SearchRequest request) { try { var result = _deviceTypeRepository.List(request); Entity.SearchResult <List <Entity.DeviceTypeDetail> > response = new Entity.SearchResult <List <Entity.DeviceTypeDetail> >() { Items = result.Items.Select(p => Mapper.Configuration.Mapper.Map <Entity.DeviceTypeDetail>(p)).ToList(), Count = result.Count }; return(response); } catch (Exception ex) { _logger.Error(Constants.ACTION_EXCEPTION, $"DeviceTypeDetailService.List, Error: {ex.Message}"); return(new Entity.SearchResult <List <Entity.DeviceTypeDetail> >()); } }