ObjectContext.AddObject Method (String, Object)

 

Adds an object to the object context.

Namespace:   System.Data.Entity.Core.Objects
Assembly:  EntityFramework (in EntityFramework.dll)

public virtual void AddObject(
	string entitySetName,
	object entity
)

Parameters

entitySetName
Type: System.String

Represents the entity set name, which may optionally be qualified by the entity container name.

entity
Type: System.Object

The Object to add.

Exception Condition
ArgumentNullException

The entity parameter is null or the entitySetName does not qualify.