예제 #1
0
 public IActionResult DeleteTrip(int id)
 {
     try{
         _service.DeleteTrip(id);
         return(Ok());
     }
     catch (Exception ex) {
         return(BadRequest(ex.Message));
     }
 }
예제 #2
0
        public IActionResult DeleteTrip(int id)
        {
            //if(tripId == null)
            //{
            //    return NotFound();
            //}

            _tripService.DeleteTrip(id);

            return(Ok(id));
        }
예제 #3
0
        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));
            }
        }
예제 #5
0
 public IActionResult DeleteTrip(int id)
 {
     _service.DeleteTrip(id);
     return(Ok());
 }
예제 #6
0
        public IActionResult Delete(int tripId)
        {
            var result = _service.DeleteTrip(tripId);

            return(Ok(result));
        }