public async Task <IActionResult> PutLkStudent(int id, LkStudent lkStudent) { if (id != lkStudent.Id) { return(BadRequest()); } _context.Entry(lkStudent).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!LkStudentExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public Task UpdateStudent(LkStudent stud) { _db.Students.Update(stud); return(_db.SaveChangesAsync()); }