/// <summary> /// Gets or sets the <see cref="TEntity" /> with the specified index. /// </summary> public TEntity this[int index] { get { ///// // Struct type always returns an instance. ///// IMutableIdKey match = _tracker.ElementAt(index); return(Entity.Get <TEntity>(match.Key)); } set { Precheck( ); ///// // Struct type always returns an instance. ///// IMutableIdKey match = _tracker.ElementAt(index); _tracker.Remove(match); if (value != null) { _tracker.Add((( IEntityInternal )value).MutableId); } } }