public IHttpActionResult Delete(int id) { bool isDeleted = businessService.DeleteBusiness(id); if (isDeleted == true) { return(Ok()); } return(BadRequest()); }
public async Task <ActionResult <DeleteModel> > DeleteMovie(int businessId) { try { return(Ok(await businessService.DeleteBusiness(businessId))); } catch (RequestNotFoundException ex) { return(NotFound(ex.Message)); } catch (InternalServerException ex) { return(StatusCode(StatusCodes.Status500InternalServerError, ex.Message)); } }
public async Task <RedirectToActionResult> Delete(int id) { businessService.DeleteBusiness(id); return(RedirectToAction("Index")); }