public async Task <IActionResult> Delete(int id) { try { var deleted = await _service.Delete(id); if (deleted) { return(Ok()); } else { return(NotFound()); } } catch (Exception e) { ConsoleLogError("Delete", e); return(StatusCode(500)); } }
private async Task <bool> DeleteMT( IMaintenanceTaskService service, int id) { return(await service.Delete(id)); }