Can i comment _context.SyncObjectState(entity) in Insert Method?

Apr 9, 2016 at 10:47 AM
Hi,
Thanks for sharing URF framework.It's a flexible solution. I have a question,Can i comment _context.SyncObjectState(entity) in Insert Method?
   public virtual void Insert(TEntity entity)
        {
            entity.ObjectState = ObjectState.Added;;
            _dbSet.Attach(entity);
            //_context.SyncObjectState(entity);
        }
It seems that duplication as below:
public void SyncObjectsStatePostCommit()
        {
            foreach (var dbEntityEntry in ChangeTracker.Entries())
            {
                ((IObjectState)dbEntityEntry.Entity).ObjectState = StateHelper.ConvertState(dbEntityEntry.State);
            }
        }