public async Task <ActionResult <TripsDto> > Get(int tripId) { try { var result = await _eventRepository.GetTrip(tripId); if (result == null) { return(NotFound()); } var mappedEntity = _mapper.Map <TripsDto>(result); return(Ok(mappedEntity)); } catch (Exception) { return(this.StatusCode(StatusCodes.Status500InternalServerError, "Database Failure")); } }