Ejemplo n.º 1
0
        public async Task <ActionResult> DeleteReservation(int id)
        {
            bool result = await _reservationsService.DeleteReservation(id);

            if (result)
            {
                return(Ok(200));
            }

            return(BadRequest());
        }
Ejemplo n.º 2
0
 public IActionResult DeleteReservation(string id)
 {
     try
     {
         if (_reservationService.DeleteReservation(id))
         {
             return(NoContent());
         }
         return(NotFound("Reservation with id not found"));
     }
     catch (Exception ex)
     {
         return(StatusCode(StatusCodes.Status500InternalServerError, ex.Message));
     }
 }
Ejemplo n.º 3
0
 public void DeleteReservation(int Id)
 {
     svc.DeleteReservation(Id);
 }