src/Shared/EntityFramework/Internal/DbLocalView`.cs
// <summary>
// Adds a contains check to the base implementation of InsertItem since we can't support
// duplicate entities in the set.
// </summary>
// <param name="index"> The index at which to insert. </param>
// <param name="item"> The item to insert. </param>
Adds a contains check to the base implementation of InsertItem since we can't support
duplicate entities in the set.
Adds a contains check to the base implementation of InsertItem since we can ' t support duplicate entities in the set .
protected override void InsertItem(int index, TEntity item)
        {
            if (!Contains(item))
            {
                base.InsertItem(index, item);
            }
        }
protected override void InsertItem ( int index , TEntity item ) { if ( ! Contains ( item ) ) { base . InsertItem ( index , item ) ; } }
Adds a contains check to the base implementation of InsertItem since we can't support
duplicate entities in the set.
Adds a contains check to the base implementation of InsertItem since we can ' t support duplicate entities in the set .
index
int
The index at which to insert.
The index at which to insert .
item
TEntity
The item to insert.
The item to insert .