public ActionResult <bool> DeleteWorkshopById([FromRoute] int workshopId) { try { return(Ok(_service.DeleteWorkshop(workshopId))); } catch (NotFoundItemException ex) { return(StatusCode(StatusCodes.Status404NotFound, $"Something bad happened: {ex.Message}")); } catch (Exception ex) { return(StatusCode(StatusCodes.Status500InternalServerError, $"Something bad happened: {ex.Message}")); } }
public async Task <IActionResult> DeleteWorkshop(long id) { await _workshopService.DeleteWorkshop(id); return(NoContent()); }