public async Task <IActionResult> Delete(int id) { try { await _travelPlanService.Delete(id); return(NoContent()); } catch (EntityNotFoundException) { return(NotFound()); } }
public async Task <IActionResult> Delete(Guid id) { var result = await _travelPlanService.Delete(id); if (result) { return(Ok()); } else { return(NotFound()); } }