public async Task <IActionResult> Delete(int id) { var toDelete = await _computerRepository.GetByIdAsync(id); if (toDelete == null) { return(NotFound()); } await _computerRepository.DeleteAsync(toDelete); return(Ok()); }