public IActionResult DeleteEvent(int id) { try { bool succes = _eventLogic.Delete(id); if (!succes) { return(NotFound()); } return(Ok(true)); } catch (Exception ex) { return(StatusCode(500, "Internal server error")); } }
public async Task <IActionResult> Delete([FromRoute] int id) { await _eventLogic.Delete(id); return(RedirectToAction("Index")); }
public IActionResult Delete([FromRoute] string id) { _eventLogic.Delete(id); return(NoContent()); }
public int Delete(int id) { return(_eventLogic.Delete(id)); }