public ActionResult <bool> Delete(int id) { try { return(Ok(_repository.Delete(id))); } catch (Exception ex) { _logger.LogError($"Error: Controller exception on Delete(int id)"); return(StatusCode((int)HttpStatusCode.InternalServerError, new { Error = ex.Message })); } }