public async Task <IActionResult> PutProducts(int id, Products products) { if (id != products.ProductId) { return(BadRequest()); } _context.Entry(products).State = EntityState.Modified; await _context.SaveChangesAsync(); return(NoContent()); }
public async Task <IActionResult> Put(int id, Categories item) { if (id != item.CategoryId) { return(BadRequest()); } _context.Entry(item).State = EntityState.Modified; await _context.SaveChangesAsync(); return(NoContent()); }