public virtual void StartTracking(
     [NotNull] object entity, [NotNull] EntityTrackingInfo entityTrackingInfo)
 {
     if (_queryBuffer != null)
     {
         _queryBuffer.StartTracking(entity, entityTrackingInfo);
     }
     else
     {
         entityTrackingInfo.StartTracking(StateManager, entity, ValueBuffer.Empty);
     }
 }
        public virtual void StartTracking(object entity, EntityTrackingInfo entityTrackingInfo)
        {
            Check.NotNull(entity, nameof(entity));
            Check.NotNull(entityTrackingInfo, nameof(entityTrackingInfo));

            object boxedValueBuffer;

            if (_valueBuffers.TryGetValue(entity, out boxedValueBuffer))
            {
                entityTrackingInfo
                .StartTracking(_stateManager, entity, (ValueBuffer)boxedValueBuffer);
            }

            foreach (var includedEntity
                     in entityTrackingInfo.GetIncludedEntities(entity)
                     .Where(includedEntity
                            => _valueBuffers.TryGetValue(includedEntity.Entity, out boxedValueBuffer)))
            {
                includedEntity.StartTracking(_stateManager, (ValueBuffer)boxedValueBuffer);
            }
        }
        public virtual void StartTracking(object entity, EntityTrackingInfo entityTrackingInfo)
        {
            Check.NotNull(entity, nameof(entity));
            Check.NotNull(entityTrackingInfo, nameof(entityTrackingInfo));

            object boxedValueBuffer;
            if (_valueBuffers.TryGetValue(entity, out boxedValueBuffer))
            {
                entityTrackingInfo
                    .StartTracking(_stateManager, entity, (ValueBuffer)boxedValueBuffer);
            }

            foreach (var includedEntity 
                in entityTrackingInfo.GetIncludedEntities(entity)
                    .Where(includedEntity
                        => _valueBuffers.TryGetValue(includedEntity.Entity, out boxedValueBuffer)))
            {
                includedEntity.StartTracking(_stateManager, (ValueBuffer)boxedValueBuffer);
            }
        }