public async Task <IActionResult> PutProductCategory(int id, ProductCategory productCategory) { if (id != productCategory.Id) { return(BadRequest()); } _context.Entry(productCategory).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (Exception) { throw; } return(Ok(productCategory)); }
public async Task <IActionResult> Put(int id, YD yd) { if (id != yd.Id) { return(BadRequest()); } _context.Entry(yd).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (Exception) { throw; } return(Ok(yd)); }