ObjectContext.AddObject(String, Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds an object to the object context.
public virtual void AddObject (string entitySetName, object entity);
abstract member AddObject : string * obj -> unit
override this.AddObject : string * obj -> unit
Public Overridable Sub AddObject (entitySetName As String, entity As Object)
Parameters
- entitySetName
- String
Represents the entity set name, which may optionally be qualified by the entity container name.
Exceptions
The entity parameter is null or the entitySetName does not qualify.
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Entity Framework