public IActionResult Delete(int id) { return(_invoice.delete(id) ? new NoContentResult() : StatusCode(500)); }