public async Task <IActionResult> Delete(int id) { try { await _brandsRepository.Delete(id); return(NoContent()); } catch (InvalidBrandException) { return(NotFound()); } }
public void Delete(int id) { _brandsRepository.Delete(id); }