コード例 #1
0
        public IActionResult Delete(int id)
        {
            try
            {
                service.Delete(id);

                return(new NoContentResult());
            }
            catch (ArgumentException ex)
            {
                return(NotFound(ex));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex));
            }
        }