public async Task <IActionResult> Delete(int id) { var ok = await _repository.DeleteAsync(id); if (ok) { return(NoContent()); } return(NotFound()); }
public async Task <IActionResult> Delete(int id) { var wasDeleted = await _repository.DeleteAsync(id); if (!wasDeleted) { _log.LogDebug("id={id} not found. Return 404 NotFound", id); return(NotFound()); } return(NoContent()); }