public IActionResult Delete(Hall hall) { var result = _hallService.Delete(hall); if (result.Success) { return(Ok(result.Message)); } return(BadRequest(result.Message)); }
public ActionResult DeleteConfirmed(long id) { HallDomainModel hallDomainModel = _hallService.ReadById(id); if (hallDomainModel == null) { return(new HttpStatusCodeResult(HttpStatusCode.NotFound)); } _hallService.Delete(hallDomainModel); return(RedirectToAction("Index")); }
public IActionResult Delete(Guid id) { try { if (ModelState.IsValid) { _hallService.Delete(id); return(Ok()); } else { return(BadRequest(ModelState)); } } catch (Exception ex) { ModelState.AddModelError(string.Empty, ex.Message); return(BadRequest(ModelState)); } }