public async Task <IActionResult> Put([FromRoute] int id, [FromBody] Logs value) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != value.Id) { return(BadRequest()); } _context.Entry(value).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ValueExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public void Update(TEntity item) { _context.Entry(item).State = EntityState.Modified; }