public async Task <IActionResult> PutBrand(int id, Brand brand) { if (id != brand.BrandId) { return(BadRequest()); } _IBrand.Update(brand); try { await _IBrand.SaveAsync(); } catch (DbUpdateConcurrencyException) { if (!BrandExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }