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