Example #1
0
 public IActionResult Delete(int id)
 {
     try
     {
         service.Delete(id);
         return(NoContent());
     }
     catch (Exception ex)
     {
         return(NotFound(ex));
     }
 }
Example #2
0
        public async Task <IActionResult> Delete(int id)
        {
            bool result = await service.Delete(id);

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

            return(NoContent());
        }
        public IActionResult Delete(int id)
        {
            bool result = service.Delete(id);

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

            return(NoContent());
        }
        public async Task <ActionResult> Delete(int id)
        {
            var success = await _stewardessService.Delete(id);

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

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

            return(NoContent());
        }
        public async Task <IActionResult> Delete(int id)
        {
            await _service.Delete(id);

            return(NoContent());
        }
Example #7
0
 public void Delete()
 {
     service.Delete();
 }