src/Shared/EntityFramework/Core/Metadata/Edm/EntitySetBaseCollection.cs
// <summary>
// Adds an item to the collection
// </summary>
// <param name="item"> The item to add to the list </param>
// <exception cref="System.ArgumentNullException">Thrown if item argument is null</exception>
// <exception cref="System.InvalidOperationException">Thrown if the item passed in or the collection itself instance is in ReadOnly state</exception>
// <exception cref="System.ArgumentException">Thrown if the EntitySetBase that is being added already belongs to another EntityContainer</exception>
// <exception cref="System.ArgumentException">Thrown if the EntitySetCollection already contains an EntitySet with the same identity</exception>
Adds an item to the collection
Adds an item to the collection
public override void Add(EntitySetBase item)
        {
            Check.NotNull(item, "item");
            ThrowIfItHasEntityContainer(item, "item");
            base.Add(item);
            item.ChangeEntityContainerWithoutCollectionFixup(_entityContainer);
        }
public override void Add ( EntitySetBase item ) { Check . NotNull ( item , " " ) ; ThrowIfItHasEntityContainer ( item , " " ) ; base . Add ( item ) ; item . ChangeEntityContainerWithoutCollectionFixup ( _entityContainer ) ; }
Adds an item to the collection
Adds an item to the collection
// Check to make sure the given entity set is not associated with another type // Fix up the declaring type
Thrown if item argument is null
Thrown if item argument is null
Thrown if the item passed in or the collection itself instance is in ReadOnly state
Thrown if the item passed in or the collection itself instance is in ReadOnly state
Thrown if the EntitySetBase that is being added already belongs to another EntityContainer
Thrown if the EntitySetBase that is being added already belongs to another EntityContainer
Thrown if the EntitySetCollection already contains an EntitySet with the same identity
Thrown if the EntitySetCollection already contains an EntitySet with the same identity
item
EntitySetBase
The item to add to the list
The item to add to the list