public async Task <IActionResult> GetPlace([FromBody] GetPlaceInput getinput) { if (!ModelState.IsValid) { return(BadRequest()); } var result = await TuristPlaceService.GetPlace(getinput); return(Ok(result)); }
public async Task <GetPlaceOutputDto> GetPlace(GetPlaceInput getinput) { var findplace = await Findplace(getinput.Name); var ShowPlace = TuristPlaceRepository.GetQuery().Include(t => t.TuristPlaceCategory) .Include(p => p.Country) .Include(p => p.City) .Include(p => p.Comments) .Include(p => p.Rates) .Where(tp => tp.Name == findplace.Name) .Select(p => mapper.Map <GetPlaceOutputDto>(p)).FirstOrDefault(); return(ShowPlace); }