public async Task <IActionResult> PutCatogory(int id, Catogory catogory) { if (id != catogory.CatogoryId) { return(BadRequest()); } _context.Entry(catogory).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CatogoryExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutProductOrders(int id, ProductOrders productOrders) { if (id != productOrders.Id) { return(BadRequest()); } _context.Entry(productOrders).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ProductOrdersExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }