public void Update(TEntity entityToUpdate)
 {
     //dbSet.AddOrUpdate(entityToUpdate);
     dbSet.Attach(entityToUpdate);
     context.Entry(entityToUpdate).State = EntityState.Modified;
 }
Exemple #2
0
 public void UpdateStudent(Student student)
 {
     context.Entry(student).State = EntityState.Modified;
 }