public async Task <IActionResult> DiscardScheduling(Guid id) { if (ActionResult(id, out var actionResult)) { return(actionResult); } var discarded = await _schedulingRepository.DiscardTimeSlotAsync(id); if (!discarded) { return(NotFound($"Time slot with id {id} cannot be found")); } return(Ok()); }