예제 #1
0
 public IActionResult Delete(int id)
 {
     try
     {
         service.Delete(id);
         return(NoContent());
     }
     catch (Exception)
     {
         return(NotFound());
     }
 }
예제 #2
0
        public async Task <IActionResult> Delete(int id)
        {
            try
            {
                await service.Delete(id);

                return(NoContent());
            }
            catch (Exception ex)
            {
                return(NotFound(ex));
            }
        }
예제 #3
0
        public IActionResult Delete(int id)
        {
            bool result = service.Delete(id);

            if (!result)
            {
                return(NotFound());
            }

            return(NoContent());
        }
        public async Task <IActionResult> Delete(int id)
        {
            bool result = await service.Delete(id);

            if (!result)
            {
                return(NotFound());
            }

            return(NoContent());
        }
예제 #5
0
        public async Task <ActionResult> Delete(int id)
        {
            var success = await _crewService.Delete(id);

            if (success)
            {
                return(Ok());
            }

            return(BadRequest());
        }
        public IActionResult Delete(Guid id)
        {
            try
            {
                crewService.Delete(id);
            }
            catch (Exception ex)
            {
                return(BadRequest(new { Type = ex.GetType().Name, ex.Message }));
            }

            return(NoContent());
        }
예제 #7
0
 public void Delete(int id)
 {
     _crewService.Delete(id);
 }
예제 #8
0
 public void Delete()
 {
     service.Delete();
 }
        public async Task <IActionResult> Delete(int id)
        {
            await _service.Delete(id);

            return(NoContent());
        }