public async Task <IActionResult> PutGlobals([FromRoute] int id, [FromBody] Globals globals) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != globals.Id) { return(BadRequest()); } _context.Entry(globals).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!GlobalsExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutKbarticle(long id, Kbarticle item) { if (id != item.Id) { return(BadRequest()); } _context.Entry(item).State = EntityState.Modified; await _context.SaveChangesAsync(); return(NoContent()); }
public async Task <IActionResult> PutProduct(int id, User item) { if (id != item.Id) { return(BadRequest()); } _context.Entry(item).State = EntityState.Modified; await _context.SaveChangesAsync(); return(NoContent()); }