Problem resolved...
The Repository.cs has a internal IQueryable<TEntity> Select(.... I added the AsNoTracking() on this line:
_IQueryable<TEntity> query = dbSet.AsNoTracking();
Now when i update my object using:
The Repository.cs has a internal IQueryable<TEntity> Select(.... I added the AsNoTracking() on this line:
_IQueryable<TEntity> query = dbSet.AsNoTracking();
Now when i update my object using:
public virtual void Update(TEntity entity)
{
var existing = _dbSet.Local;// NOW LOCAL IS NULL
entity.ObjectState = ObjectState.Modified;
_dbSet.Attach(entity);//no exceptions here
_context.SyncObjectState(entity);
}