public async Task <IActionResult> PutRate(int id, Rate rate) { if (id != rate.Id) { return(BadRequest()); } _context.Entry(rate).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!RateExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutTradeMark(int id, TradeMark tradeMark) { if (id != tradeMark.TradeMarkId) { return(BadRequest()); } _context.Entry(tradeMark).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TradeMarkExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutInfoAccount(int id, InfoAccount infoAccount) { if (id != infoAccount.InfoAccountId) { return(BadRequest()); } _context.Entry(infoAccount).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!InfoAccountExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutProduct(int id, Product product) { if (id != product.WatchId) { return(BadRequest()); } _context.Entry(product).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ProductExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutBillDetail(int id, BillDetail billDetail) { if (id != billDetail.BillDetailId) { return(BadRequest()); } _context.Entry(billDetail).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!BillDetailExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }