public IActionResult DeleteTrip(int id) { try{ _service.DeleteTrip(id); return(Ok()); } catch (Exception ex) { return(BadRequest(ex.Message)); } }
public IActionResult DeleteTrip(int id) { //if(tripId == null) //{ // return NotFound(); //} _tripService.DeleteTrip(id); return(Ok(id)); }
public async Task <IActionResult> DeleteTrip([FromRoute] Guid TripID) { try { await _tripService.DeleteTrip(TripID); } catch (Exception ex) { return(StatusCode(500)); } return(Ok()); }
public async Task <IActionResult> DeleteTrip([FromRoute] int trip_id) { try { var trip = await _context.DeleteTrip(trip_id); var dto = mapper.Map <UserTripsViewModel[]>(trip); return(Ok(dto)); } catch (Exception ex) { return(BadRequest(ex.Message)); } }
public IActionResult DeleteTrip(int id) { _service.DeleteTrip(id); return(Ok()); }
public IActionResult Delete(int tripId) { var result = _service.DeleteTrip(tripId); return(Ok(result)); }