コード例 #1
0
        public async Task <IActionResult> Delete(int id)
        {
            try {
                await _travelPlanService.Delete(id);

                return(NoContent());
            }
            catch (EntityNotFoundException)
            {
                return(NotFound());
            }
        }
コード例 #2
0
        public async Task <IActionResult> Delete(Guid id)
        {
            var result = await _travelPlanService.Delete(id);

            if (result)
            {
                return(Ok());
            }
            else
            {
                return(NotFound());
            }
        }