public void Update(SysUser user) { context.Entry(user).State = System.Data.Entity.EntityState.Modified; }
public void Update(TEntity entity) { dbSet.Attach(entity); context.Entry(entity).State = EntityState.Modified; }