Ejemplo n.º 1
0
        public async Task <TravelDTO> GetTravelByIdAsync(int tId)
        {
            var travel = await TravelRepository.GetSingleModelAsync(t => t.id == tId);

            TravelDTO travelDTO = Mapper.Map <TravelDTO>(travel);
            List <FileAttachmentEntity> fileAttachments = await _travelFileAttachmentService.GetTravelFileListByTravelId(travel.id);

            travelDTO.imgList = Mapper.Map <List <FileAttachmentDTO> >(fileAttachments);
            return(travelDTO);
        }