public ActionResult Put(int id, [FromBody] StudentsDB value) { if (id != value.id) { return(BadRequest()); } data.Entry(value).State = EntityState.Modified; data.SaveChanges(); return(Ok()); }