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