public IEnumerable <TourAndDetailsDTO> Get() { List <TourAndDetailsDTO> data = new List <TourAndDetailsDTO>(); var tours = tour.GetTours(); foreach (TourDTO t in tours) { var listOC = list.GetListOC(t.Id.ToString()); var count = country.GetCountry(listOC.CountryId); data.Add(new TourAndDetailsDTO() { Tours = t, Types = type.GetTourType(t.TourTypeId), Infos = info.GetTourInfo(t.InfoId), ListOfCountries = listOC, Countries = count, Regions = region.GetRegion(count.RegionId), }); } return(data); }
public IHttpActionResult GetTourType(int id) { return(Ok(_tourTypeService.GetTourType(id))); }
// GET: api/TourType/5 public IHttpActionResult Get(int id) { return(Ok(mapper.Map <TourTypeDTO, TourType>(service.GetTourType(id)))); }