public async Task <ActionResult> Delete(int id) { var toDelete = await _repository.GetAsync(id); if (toDelete == null) { return(BadRequest($"coach with {id} wasn't found")); } _repository.Delete(toDelete); await _repository.SaveChangesAsync(); return(NoContent()); }
/// <summary> /// /// </summary> /// <param name="id"></param> public void Delete(Guid id) { _hallRepository.Delete(id); }