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