コード例 #1
0
        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));
            }
        }
コード例 #2
0
 private async Task <bool> DeleteMT(
     IMaintenanceTaskService service, int id)
 {
     return(await service.Delete(id));
 }