public async Task <IActionResult> Remove(int?id) { if (id == null) { return(NotFound()); } Brand existBrand = await _iBrandManager.GetById(id); if (existBrand == null) { return(NotFound()); } bool remove = await _iBrandManager.Remove(existBrand); if (remove) { return(RedirectToAction("Index")); } return(BadRequest()); }