public IActionResult DeleteWeek(int weekId) { if (!_repo.WeekExists(weekId)) { return(NotFound()); } var weekToDelete = _repo.GetWeek(weekId); _repo.DeleteWeek(weekToDelete); if (!_repo.Save()) { return(StatusCode(500, $"A problem happened while handling your request to delete a week with id: {weekId}.")); } return(NoContent());//success }