public Doctor editDoctor(Doctor doc) { try { context.Attach(doc); context.Entry(doc).State = EntityState.Modified; context.SaveChanges(); } catch (Exception) { throw; } return(doc); }
public Student modifyStudent(Student student) { try { context.Attach(student); context.Entry(student).State = EntityState.Modified; context.SaveChanges(); } catch (Exception) { throw; } return(student); }