public IActionResult Delete(int id) { var patron = _patronRepository.GetById(id); if (patron == null) { return(NotFound()); } _patronRepository.Delete(patron); var response = new { MessageBody = "Successfully Deleted" }; return(Ok(response)); }
public IActionResult Delete(int id) { var book = _patronRepository.GetById(id); if (book == null) { return(NotFound()); } _patronRepository.Delete(book); return(NoContent()); }